All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: Dan Williams <dan.j.williams@intel.com>, akpm@linux-foundation.org
Cc: Rik van Riel <riel@redhat.com>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Mel Gorman <mgorman@suse.de>, Mark <markk@clara.co.uk>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Subject: Re: [PATCH v2] mm: exclude ZONE_DEVICE from GFP_ZONE_TABLE
Date: Fri, 4 Mar 2016 15:11:50 +0100	[thread overview]
Message-ID: <56D997A6.7070200@suse.cz> (raw)
In-Reply-To: <20160302002829.38211.89593.stgit@dwillia2-desk3.amr.corp.intel.com>

On 03/02/2016 01:32 AM, Dan Williams wrote:
> ZONE_DEVICE (merged in 4.3) and ZONE_CMA (proposed) are examples of new
> mm zones that are bumping up against the current maximum limit of 4
> zones, i.e. 2 bits in page->flags for the GFP_ZONE_TABLE.
> 
> The GFP_ZONE_TABLE poses an interesting constraint since
> include/linux/gfp.h gets included by the 32-bit portion of a 64-bit
> build.  We need to be careful to only build the table for zones that
> have a corresponding gfp_t flag.  GFP_ZONES_SHIFT is introduced for this
> purpose.  This patch does not attempt to solve the problem of adding a
> new zone that also has a corresponding GFP_ flag.
> 
> Vlastimil points out that ZONE_DEVICE, by depending on x86_64 and
> SPARSEMEM_VMEMMAP implies that SECTIONS_WIDTH is zero.  In other words

                                                       ^ by default

Because CONFIG_SPARSEMEM_VMEMMAP can still be disabled by the user.

> even though ZONE_DEVICE does not fit in GFP_ZONE_TABLE it is free to
> consume another bit in page->flags (expand ZONES_WIDTH) with room to
> spare.

So it's still possible to configure the x86_64 kernel such that you get
"#warning Unfortunate NUMA and NUMA Balancing config". But it requires
some effort to override the defaults, and it's not breaking build or
runtime. BTW I was able to get that warning even with your previous
patch that limited NODES_WIDTH, so that wasn't a solution for this
anyway. This patch is simpler and better.

> Link: https://bugzilla.kernel.org/show_bug.cgi?id=110931
> Fixes: 033fbae988fc ("mm: ZONE_DEVICE for "device memory"")
> Cc: Mel Gorman <mgorman@suse.de>
> Cc: Rik van Riel <riel@redhat.com>
> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
> Cc: Dave Hansen <dave.hansen@linux.intel.com>
> Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
> Reported-by: Mark <markk@clara.co.uk>
> Reported-by: Vlastimil Babka <vbabka@suse.cz>
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>

Acked-by: Vlastimil Babka <vbabka@suse.cz>

--
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>

WARNING: multiple messages have this Message-ID (diff)
From: Vlastimil Babka <vbabka@suse.cz>
To: Dan Williams <dan.j.williams@intel.com>, akpm@linux-foundation.org
Cc: Rik van Riel <riel@redhat.com>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Mel Gorman <mgorman@suse.de>, Mark <markk@clara.co.uk>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Subject: Re: [PATCH v2] mm: exclude ZONE_DEVICE from GFP_ZONE_TABLE
Date: Fri, 4 Mar 2016 15:11:50 +0100	[thread overview]
Message-ID: <56D997A6.7070200@suse.cz> (raw)
In-Reply-To: <20160302002829.38211.89593.stgit@dwillia2-desk3.amr.corp.intel.com>

On 03/02/2016 01:32 AM, Dan Williams wrote:
> ZONE_DEVICE (merged in 4.3) and ZONE_CMA (proposed) are examples of new
> mm zones that are bumping up against the current maximum limit of 4
> zones, i.e. 2 bits in page->flags for the GFP_ZONE_TABLE.
> 
> The GFP_ZONE_TABLE poses an interesting constraint since
> include/linux/gfp.h gets included by the 32-bit portion of a 64-bit
> build.  We need to be careful to only build the table for zones that
> have a corresponding gfp_t flag.  GFP_ZONES_SHIFT is introduced for this
> purpose.  This patch does not attempt to solve the problem of adding a
> new zone that also has a corresponding GFP_ flag.
> 
> Vlastimil points out that ZONE_DEVICE, by depending on x86_64 and
> SPARSEMEM_VMEMMAP implies that SECTIONS_WIDTH is zero.  In other words

                                                       ^ by default

Because CONFIG_SPARSEMEM_VMEMMAP can still be disabled by the user.

> even though ZONE_DEVICE does not fit in GFP_ZONE_TABLE it is free to
> consume another bit in page->flags (expand ZONES_WIDTH) with room to
> spare.

So it's still possible to configure the x86_64 kernel such that you get
"#warning Unfortunate NUMA and NUMA Balancing config". But it requires
some effort to override the defaults, and it's not breaking build or
runtime. BTW I was able to get that warning even with your previous
patch that limited NODES_WIDTH, so that wasn't a solution for this
anyway. This patch is simpler and better.

> Link: https://bugzilla.kernel.org/show_bug.cgi?id=110931
> Fixes: 033fbae988fc ("mm: ZONE_DEVICE for "device memory"")
> Cc: Mel Gorman <mgorman@suse.de>
> Cc: Rik van Riel <riel@redhat.com>
> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
> Cc: Dave Hansen <dave.hansen@linux.intel.com>
> Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
> Reported-by: Mark <markk@clara.co.uk>
> Reported-by: Vlastimil Babka <vbabka@suse.cz>
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>

Acked-by: Vlastimil Babka <vbabka@suse.cz>

  reply	other threads:[~2016-03-04 14:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-02  0:32 [PATCH v2] mm: exclude ZONE_DEVICE from GFP_ZONE_TABLE Dan Williams
2016-03-02  0:32 ` Dan Williams
2016-03-04 14:11 ` Vlastimil Babka [this message]
2016-03-04 14:11   ` Vlastimil Babka
2016-03-04 15:59   ` Dan Williams
2016-03-04 15:59     ` Dan Williams

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=56D997A6.7070200@suse.cz \
    --to=vbabka@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=dan.j.williams@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=markk@clara.co.uk \
    --cc=mgorman@suse.de \
    --cc=riel@redhat.com \
    --cc=sudipm.mukherjee@gmail.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 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.