[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110610235442.GA21413@cmpxchg.org>
Date: Sat, 11 Jun 2011 01:54:42 +0200
From: Johannes Weiner <hannes@...xchg.org>
To: Hugh Dickins <hughd@...gle.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
Andrea Arcangeli <aarcange@...hat.com>,
Ying Han <yinghan@...gle.com>, Dave Jones <davej@...hat.com>,
Linux Kernel <linux-kernel@...r.kernel.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
Oleg Nesterov <oleg@...hat.com>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>
Subject: Re: [PATCH] [BUGFIX] update mm->owner even if no next owner.
On Fri, Jun 10, 2011 at 02:49:35PM -0700, Hugh Dickins wrote:
> On Fri, 10 Jun 2011, KAMEZAWA Hiroyuki wrote:
> >
> > I think this can be a fix.
>
> Sorry, I think not: I've not digested your rationale,
> but three things stand out:
>
> 1. Why has this only just started happening? I may not have run that
> test on 3.0-rc1, but surely I ran it for hours with 2.6.39;
> maybe not with khugepaged, but certainly with ksmd.
>
> 2. Your hunk below:
> > - if (!mm_need_new_owner(mm, p))
> > + if (!mm_need_new_owner(mm, p)) {
> > + rcu_assign_pointer(mm->owner, NULL);
> is now setting mm->owner to NULL at times when we were sure it did not
> need updating before (task is not the owner): you're damaging mm->owner.
>
> 3. There's a patch from Andrea in 3.0-rc1 which looks very likely to be
> relevant, 692e0b35427a "mm: thp: optimize memcg charge in khugepaged".
> I'll try reproducing without that tonight (I crashed in 20 minutes
> this morning, so it's not too hard).
It looks likely. This change moved the memcg charge out of the
mmap_sem read section, which kept the last task of the mm from
exiting:
do_exit
exit_mm
mmput
khugepaged_exit
down_write(&mm->mmap_sem);
up_write(&mm->mmap_sem);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists