Re: [RFC 3/4] mm: support remove_mapping in irqcontext

From: Minchan Kim
Date: Tue May 14 2013 - 03:17:26 EST


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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/