Re: [RFC][PATCH 1/3] memcg: wake up filter in oom waitqueue

From: Daisuke Nishimura
Date: Thu Mar 11 2010 - 22:02:49 EST


On Fri, 12 Mar 2010 11:38:38 +0900, KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> wrote:
> On Fri, 12 Mar 2010 11:30:28 +0900
> Daisuke Nishimura <nishimura@xxxxxxxxxxxxxxxxx> wrote:
>
> > On Thu, 11 Mar 2010 16:55:59 +0900, KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> wrote:
> > > From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx>
> > > + /* check hierarchy */
> > > + if (!css_is_ancestor(&oom_wait_info->mem->css, &wake_mem->css) &&
> > > + !css_is_ancestor(&wake_mem->css, &oom_wait_info->mem->css))
> > > + return 0;
> > > +
> > I think these conditions are wrong.
> > This can wake up tasks in oom_wait_info->mem when:
> >
> > 00/ <- wake_mem: use_hierarchy == false
> > aa/ <- oom_wait_info->mem: use_hierarchy == true;
> >
> Hmm. I think this line bails out above case.
>
> > + if (!oom_wait_info->mem->use_hierarchy || !wake_mem->use_hierarchy)
> > + return 0;
>
> No ?
>
Oops! you're right. I misunderstood the code.

Then, this patch looks good to me.

Reviewed-by: Daisuke Nishimura <nishimura@xxxxxxxxxxxxxxxxx>

Thanks,
Daisuke Nishimura.
--
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/