lkml.org 
[lkml]   [2011]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -rt] memcg: use migrate_disable()/migrate_enable( ) in memcg_check_events()
On Wed, 16 Nov 2011 17:18:09 +0000
Luis Henriques <henrix@camandro.org> wrote:

> On Wed, Nov 16, 2011 at 06:02:42PM +0100, Thomas Gleixner wrote:
> > On Wed, 16 Nov 2011, Steven Rostedt wrote:
> > > On Wed, 2011-11-16 at 17:16 +0800, Yong Zhang wrote:
> > > > Looking at commit 4799401f [memcg: Fix race condition in
> > > > memcg_check_events() with this_cpu usage], we just want
> > > > to disable migration. So use the right API in -rt. This
> > > > will cure below warning.
> > > No this won't work. Not even for -rt. If we disable migration but not
> > > preemption, then two tasks can take this path. And the checks in
> > > __memcg_event_check() will be corrupted because nothing is protecting
> > > the updates from two tasks going into the same path.
> > >
> > > Perhaps a local_lock would work.
> >
> > Yes, that's the only sensible option for now. Untested patch below.
>
> I run a quick test and it looks like the problem is gone.
>
> Cheers,

Could you CC the final patch to cgroups@vger.kernel.org ?
Does this fix will go thorugh rt tree rather than -mm ?

Thanks,
-Kame



\
 
 \ /
  Last update: 2011-11-17 00:53    [W:0.090 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site