linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Vladimir Davydov <vdavydov@parallels.com>
To: Christoph Lameter <cl@linux.com>
Cc: linux-kernel@vger.kernel.org, Li Zefan <lizefan@huawei.com>,
	Pekka Enberg <penberg@kernel.org>,
	David Rientjes <rientjes@google.com>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org
Subject: Re: [PATCH 3/4] slab: fix cpuset check in fallback_alloc
Date: Sat, 27 Sep 2014 12:12:03 +0400	[thread overview]
Message-ID: <20140927081203.GA1633@esperanza> (raw)
In-Reply-To: <alpine.DEB.2.11.1409261130550.3870@gentwo.org>

Hi Christoph,

On Fri, Sep 26, 2014 at 11:31:31AM -0500, Christoph Lameter wrote:
> On Fri, 26 Sep 2014, Vladimir Davydov wrote:
> 
> > To avoid this we should use softwall cpuset check in fallback_alloc.
> 
> Its weird that softwall checking occurs by setting __GFP_HARDWALL.

Hmm, I don't think I follow. Currently we enforce *hardwall* check by
passing __GFP_HARDWALL to cpuset_zone_allowed(). However, we need
softwall check there to conform to the page allocator behavior, so I
remove the __GFP_HARDWALL flag from cpuset_zone_allowed() to get
softwall check.

Actually, initially we used softwall check in fallback_alloc(). This was
changed to hardwall check by commit b8b50b6519afa ("mm: fallback_alloc
cpuset_zone_allowed irq fix") in order to fix sleep-in-atomic bug,
because at that time softwall check required taking the callback_mutex
while fallback_alloc is called with interrupts disabled.

Thanks,
Vladimir

> >
> > Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
> > ---
> >  mm/slab.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/mm/slab.c b/mm/slab.c
> > index eb6f0cf6875c..e35822d07821 100644
> > --- a/mm/slab.c
> > +++ b/mm/slab.c
> > @@ -3051,7 +3051,7 @@ retry:
> >  	for_each_zone_zonelist(zone, z, zonelist, high_zoneidx) {
> >  		nid = zone_to_nid(zone);
> >
> > -		if (cpuset_zone_allowed(zone, flags | __GFP_HARDWALL) &&
> > +		if (cpuset_zone_allowed(zone, flags) &&
> >  			get_node(cache, nid) &&
> >  			get_node(cache, nid)->free_objects) {
> >  				obj = ____cache_alloc_node(cache,
> >

--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2014-09-27  8:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-26 14:50 [PATCH 0/4] Simplify cpuset API and fix cpuset check in SL[AU]B Vladimir Davydov
2014-09-26 14:50 ` [PATCH 1/4] cpuset: convert callback_mutex to a spinlock Vladimir Davydov
2014-09-26 15:44   ` Christoph Lameter
2014-09-26 14:50 ` [PATCH 2/4] cpuset: simplify cpuset_node_allowed API Vladimir Davydov
2014-09-26 15:53   ` Christoph Lameter
2014-09-26 14:50 ` [PATCH 3/4] slab: fix cpuset check in fallback_alloc Vladimir Davydov
2014-09-26 16:31   ` Christoph Lameter
2014-09-27  8:12     ` Vladimir Davydov [this message]
2014-09-26 14:50 ` [PATCH 4/4] slub: fix cpuset check in get_any_partial Vladimir Davydov
2014-09-29  7:25 ` [PATCH 0/4] Simplify cpuset API and fix cpuset check in SL[AU]B Zefan Li

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=20140927081203.GA1633@esperanza \
    --to=vdavydov@parallels.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lizefan@huawei.com \
    --cc=penberg@kernel.org \
    --cc=rientjes@google.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).