linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Mel Gorman <mgorman@suse.de>,
	David Rientjes <rientjes@google.com>,
	Greg Thelen <gthelen@google.com>,
	"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
	Christoph Lameter <cl@linux.com>,
	Pekka Enberg <penberg@kernel.org>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	linux-ia64@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	cbe-oss-dev@lists.ozlabs.org, kvm@vger.kernel.org
Subject: Re: [PATCH 2/3] mm: unify checks in alloc_pages_node() and __alloc_pages_node()
Date: Thu, 20 Aug 2015 16:43:06 +0200	[thread overview]
Message-ID: <20150820144306.GE4632@dhcp22.suse.cz> (raw)
In-Reply-To: <20150820141434.GD4632@dhcp22.suse.cz>

On Thu 20-08-15 16:14:34, Michal Hocko wrote:
> On Thu 20-08-15 13:43:21, Vlastimil Babka wrote:
> > Perform the same debug checks in alloc_pages_node() as are done in
> > __alloc_pages_node(), by making the former function a wrapper of the latter
> > one.
> > 
> > In addition to better diagnostics in DEBUG_VM builds for situations which
> > have been already fatal (e.g. out-of-bounds node id), there are two visible
> > changes for potential existing buggy callers of alloc_pages_node():
> > 
> > - calling alloc_pages_node() with any negative nid (e.g. due to arithmetic
> >   overflow) was treated as passing NUMA_NO_NODE and fallback to local node was
> >   applied. This will now be fatal.
> 
> OK, this is sensible
> 
> > - calling alloc_pages_node() with an offline node will now be checked for
> >   DEBUG_VM builds. Since it's not fatal if the node has been previously online,
> >   and this patch may expose some existing buggy callers, change the VM_BUG_ON
> >   in __alloc_pages_node() to VM_WARN_ON.
> 
> Yes, bugging on just because we race with memory hotplug or use
> stale node number is not appropriate because the fallback is
> straightforward. A warning should help to identify and fix those place.
> 
> > 
> > Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
> > Acked-by: David Rientjes <rientjes@google.com>
> > Acked-by: Johannes Weiner <hannes@cmpxchg.org>
> > Acked-by: Christoph Lameter <cl@linux.com>

Forgot to add
Acked-by: Michal Hocko <mhocko@suse.com>
-- 
Michal Hocko
SUSE Labs

  reply	other threads:[~2015-08-20 14:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-20 11:43 [PATCH 1/3] mm: rename alloc_pages_exact_node to __alloc_pages_node Vlastimil Babka
2015-08-20 11:43 ` [PATCH 2/3] mm: unify checks in alloc_pages_node() and __alloc_pages_node() Vlastimil Babka
2015-08-20 14:14   ` Michal Hocko
2015-08-20 14:43     ` Michal Hocko [this message]
2015-08-20 11:43 ` [PATCH 3/3] mm: use numa_mem_id() in alloc_pages_node() Vlastimil Babka
2015-08-20 14:03 ` [PATCH 1/3] mm: rename alloc_pages_exact_node to __alloc_pages_node Michal Hocko

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=20150820144306.GE4632@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=cbe-oss-dev@lists.ozlabs.org \
    --cc=cl@linux.com \
    --cc=gthelen@google.com \
    --cc=hannes@cmpxchg.org \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mgorman@suse.de \
    --cc=n-horiguchi@ah.jp.nec.com \
    --cc=penberg@kernel.org \
    --cc=rientjes@google.com \
    --cc=vbabka@suse.cz \
    /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).