Messages in this thread | | | Date | Tue, 14 May 2013 16:17:18 +0900 | From | Minchan Kim <> | Subject | Re: [RFC 3/4] mm: support remove_mapping in irqcontext |
| |
Hey Michal,
On Mon, May 13, 2013 at 04:58:57PM +0200, Michal Hocko wrote: > On Mon 13-05-13 11:10:47, Minchan Kim wrote: > [...] > > My rough plan is following as, > > > > 1. Make mctz->lock beging aware of irq by changing spin_lock with > > spin_lock_irqsave. > > I wouldn't be worried about this one as it is on its way out with the > soft limit rework (the core uncontroversial part ;))
Good to hear!
> > > 2. Introuduce new argument "locked" in __mem_cgroup_uncharge_common > > so that __mem_cgroup_uncharge_common can avoid lock_page_cgroup in > > irqcontext to avoid deadlock but caller in irqcontext should be held > > it in advance by next patch. > > 3. Introduce try_lock_page_cgroup, which will be used __swapcache_free. > > 4. __remove_mapping can held a page_cgroup lock in advance before calling > > __swapcache_free > > > > I'd like to listen memcg people's opinions before diving into coding. > > It should work. It will require some code moving, though.
Yeb. I will give it a shot!
Thanks for the review!
-- Kind regards, Minchan Kim
| |