linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dave Hansen <dave.hansen@intel.com>
To: KarimAllah Ahmed <karahmed@amazon.de>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Cc: "Andrew Morton" <akpm@linux-foundation.org>,
	"Mel Gorman" <mgorman@techsingularity.net>,
	"Vlastimil Babka" <vbabka@suse.cz>,
	"Michal Hocko" <mhocko@suse.com>,
	"Johannes Weiner" <hannes@cmpxchg.org>,
	"Yaowei Bai" <baiyaowei@cmss.chinamobile.com>,
	"Dan Williams" <dan.j.williams@intel.com>,
	"Joe Perches" <joe@perches.com>, "Tejun Heo" <tj@kernel.org>,
	"Anthony Liguori" <aliguori@amazon.com>,
	"Jan H . Schönherr" <jschoenh@amazon.de>
Subject: Re: [PATCH] sparse: Track the boundaries of memory sections for accurate checks
Date: Wed, 14 Sep 2016 17:05:54 -0700	[thread overview]
Message-ID: <57D9E5E2.7060405@intel.com> (raw)
In-Reply-To: <1466244679-23824-1-git-send-email-karahmed@amazon.de>

On 06/18/2016 03:11 AM, KarimAllah Ahmed wrote:
> @@ -1067,8 +1067,12 @@ struct mem_section {
>  	 * section. (see page_ext.h about this.)
>  	 */
>  	struct page_ext *page_ext;
> -	unsigned long pad;
> +	unsigned long pad[3];
>  #endif
> +
> +	unsigned long first_pfn;
> +	unsigned long last_pfn;

mem_section started out as a single pointer, and it's getting a bit, um,
rotund.  Remember, some architectures have a lot of physical address
space, and thus a ton of mem_sections, but very little actual memory.
This eats valuable RAM if we bloat mem_section too much.

Oh, and with this:

>         /*
>          * WARNING: mem_section must be a power-of-2 in size for the
>          * calculation and use of SECTION_ROOT_MASK to make sense.
>          */

Aren't you making a non-power-of-2 sized 'mem_section" in some cases?

This also doesn't handle if there is a hole in the _middle_ of a section.

What's wrong with using some bits in the existing usemap?

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

      parent reply	other threads:[~2016-09-15  0:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-18 10:11 [PATCH] sparse: Track the boundaries of memory sections for accurate checks KarimAllah Ahmed
2016-06-20  8:23 ` Michal Hocko
2016-06-21 14:33   ` [PATCH v2] " KarimAllah Ahmed
2016-09-14 21:40   ` [PATCH] " Raslan, KarimAllah
2016-09-14 22:05     ` Dan Williams
2016-09-14 22:11       ` Raslan, KarimAllah
2016-09-14 22:53         ` Dan Williams
2016-09-15  0:05 ` Dave Hansen [this message]

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=57D9E5E2.7060405@intel.com \
    --to=dave.hansen@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=aliguori@amazon.com \
    --cc=baiyaowei@cmss.chinamobile.com \
    --cc=dan.j.williams@intel.com \
    --cc=hannes@cmpxchg.org \
    --cc=joe@perches.com \
    --cc=jschoenh@amazon.de \
    --cc=karahmed@amazon.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=mhocko@suse.com \
    --cc=tj@kernel.org \
    --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).