Messages in this thread | | | Date | Tue, 14 Sep 2010 13:38:22 +0900 | From | KAMEZAWA Hiroyuki <> | Subject | Re: [BUGFIX][PATCH] memcg: fix race in file_mapped accouting flag management |
| |
Sorry, reposting..(because mail client died while sending..) == On Mon, 13 Sep 2010 14:08:03 -0700 Andrew Morton <akpm@linux-foundation.org> wrote:
> On Mon, 13 Sep 2010 16:08:22 +0900 > KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote: <snip> > > Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> > > --- > > mm/memcontrol.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > Index: lockless-update/mm/memcontrol.c > > =================================================================== > > --- lockless-update.orig/mm/memcontrol.c > > +++ lockless-update/mm/memcontrol.c > > @@ -1485,7 +1485,8 @@ void mem_cgroup_update_file_mapped(struc > > SetPageCgroupFileMapped(pc); > > } else { > > __this_cpu_dec(mem->stat->count[MEM_CGROUP_STAT_FILE_MAPPED]); > > - ClearPageCgroupFileMapped(pc); > > + if (page_mapped(page)) /* for race between dec->inc counter */ > > + ClearPageCgroupFileMapped(pc); > > } > > This should be !page_mapped(), shouldn't it? >
Ahhhh, yes. reflesh miss..
> And your second patch _does_ have !page_mapped() here, which is why the > second patch didn't apply. > Very sorry.
> I tried to fix things up. Please check.
Thank you.
-Kame
> > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ >
| |