All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: "Kirill A. Shutsemov" <kirill@shutemov.name>,
	Balbir Singh <balbir@linux.vnet.ibm.com>,
	Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] [BUG] memcg: fix false positive VM_BUG on non-SMP
Date: Tue, 23 Nov 2010 14:22:47 -0800	[thread overview]
Message-ID: <20101123142247.e8566e3e.akpm@linux-foundation.org> (raw)
In-Reply-To: <20101123210255.GA22484@cmpxchg.org>

On Tue, 23 Nov 2010 22:02:55 +0100
Johannes Weiner <hannes@cmpxchg.org> wrote:

> On Tue, Nov 23, 2010 at 12:16:06PM -0800, Andrew Morton wrote:
> > On Tue, 23 Nov 2010 15:48:50 +0200
> > "Kirill A. Shutsemov" <kirill@shutemov.name> wrote:
> > 
> > > ------------[ cut here ]------------
> > > kernel BUG at mm/memcontrol.c:2155!
> > 
> > This bug has been there for a year, from which I conclude people don't
> > run memcg on uniprocessor machines a lot.
> > 
> > Which is a bit sad, really.  Small machines need resource control too,
> > perhaps more than large ones..
> 
> Admittedly, this patch is compile-tested on UP only, but it should be
> obvious enough.
> 
> ---
> From: Johannes Weiner <hannes@cmpxchg.org>
> Subject: [patch] memcg: fix page cgroup lock assert on UP
> 
> Page cgroup locking primitives use the bit spinlock API functions,
> which do nothing on UP.
> 
> Thus, checking the lock state can not be done by looking at the bit
> directly, but one has to go through the bit spinlock API as well.
> 
> This fixes a guaranteed UP bug, where asserting the page cgroup lock
> bit as a sanity check crashes the kernel.
> 

hm, your patch is the same as Kirill's, except you named it
page_is_cgroup_locked() rather than is_page_cgroup_locked().  I guess
page_is_cgroup_locked() is a bit better.


WARNING: multiple messages have this Message-ID (diff)
From: Andrew Morton <akpm@linux-foundation.org>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: "Kirill A. Shutsemov" <kirill@shutemov.name>,
	Balbir Singh <balbir@linux.vnet.ibm.com>,
	Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] [BUG] memcg: fix false positive VM_BUG on non-SMP
Date: Tue, 23 Nov 2010 14:22:47 -0800	[thread overview]
Message-ID: <20101123142247.e8566e3e.akpm@linux-foundation.org> (raw)
In-Reply-To: <20101123210255.GA22484@cmpxchg.org>

On Tue, 23 Nov 2010 22:02:55 +0100
Johannes Weiner <hannes@cmpxchg.org> wrote:

> On Tue, Nov 23, 2010 at 12:16:06PM -0800, Andrew Morton wrote:
> > On Tue, 23 Nov 2010 15:48:50 +0200
> > "Kirill A. Shutsemov" <kirill@shutemov.name> wrote:
> > 
> > > ------------[ cut here ]------------
> > > kernel BUG at mm/memcontrol.c:2155!
> > 
> > This bug has been there for a year, from which I conclude people don't
> > run memcg on uniprocessor machines a lot.
> > 
> > Which is a bit sad, really.  Small machines need resource control too,
> > perhaps more than large ones..
> 
> Admittedly, this patch is compile-tested on UP only, but it should be
> obvious enough.
> 
> ---
> From: Johannes Weiner <hannes@cmpxchg.org>
> Subject: [patch] memcg: fix page cgroup lock assert on UP
> 
> Page cgroup locking primitives use the bit spinlock API functions,
> which do nothing on UP.
> 
> Thus, checking the lock state can not be done by looking at the bit
> directly, but one has to go through the bit spinlock API as well.
> 
> This fixes a guaranteed UP bug, where asserting the page cgroup lock
> bit as a sanity check crashes the kernel.
> 

hm, your patch is the same as Kirill's, except you named it
page_is_cgroup_locked() rather than is_page_cgroup_locked().  I guess
page_is_cgroup_locked() is a bit better.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2010-11-23 22:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-23 13:48 [PATCH] [BUG] memcg: fix false positive VM_BUG on non-SMP Kirill A. Shutsemov
2010-11-23 13:48 ` Kirill A. Shutsemov
2010-11-23 20:16 ` Andrew Morton
2010-11-23 20:16   ` Andrew Morton
2010-11-23 21:02   ` Johannes Weiner
2010-11-23 21:02     ` Johannes Weiner
2010-11-23 22:22     ` Andrew Morton [this message]
2010-11-23 22:22       ` Andrew Morton
2010-11-23 22:52       ` Johannes Weiner
2010-11-23 22:52         ` Johannes Weiner
2010-11-24  0:23         ` KAMEZAWA Hiroyuki
2010-11-24  0:23           ` KAMEZAWA Hiroyuki
2010-11-26  3:23           ` Balbir Singh
2010-11-26  3:23             ` Balbir Singh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101123142247.e8566e3e.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=balbir@linux.vnet.ibm.com \
    --cc=hannes@cmpxchg.org \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=kirill@shutemov.name \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=nishimura@mxp.nes.nec.co.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.