linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: KarimAllah Ahmed <karahmed@amazon.de>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Pavel Tatashin <pasha.tatashin@oracle.com>,
	Oscar Salvador <osalvador@suse.de>,
	Mike Rapoport <rppt@linux.ibm.com>, Baoquan He <bhe@redhat.com>,
	Qian Cai <cai@lca.pw>, Wei Yang <richard.weiyang@gmail.com>,
	Logan Gunthorpe <logang@deltatee.com>
Subject: Re: [PATCH] mm: sparse: Skip no-map regions in memblocks_present
Date: Tue, 23 Jul 2019 09:06:42 +0200	[thread overview]
Message-ID: <20190723070642.GC4552@dhcp22.suse.cz> (raw)
In-Reply-To: <1562921491-23899-1-git-send-email-karahmed@amazon.de>

On Fri 12-07-19 10:51:31, KarimAllah Ahmed wrote:
> Do not mark regions that are marked with nomap to be present, otherwise
> these memblock cause unnecessarily allocation of metadata.

This begs for much more information. How come nomap regions are in
usable memblocks? What if memblock allocator used that memory?
In other words, shouldn't nomap (an unusable memory iirc) be in reserved
memblocks or removed altogethher?

> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Pavel Tatashin <pasha.tatashin@oracle.com>
> Cc: Oscar Salvador <osalvador@suse.de>
> Cc: Michal Hocko <mhocko@suse.com>
> Cc: Mike Rapoport <rppt@linux.ibm.com>
> Cc: Baoquan He <bhe@redhat.com>
> Cc: Qian Cai <cai@lca.pw>
> Cc: Wei Yang <richard.weiyang@gmail.com>
> Cc: Logan Gunthorpe <logang@deltatee.com>
> Cc: linux-mm@kvack.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: KarimAllah Ahmed <karahmed@amazon.de>
> ---
>  mm/sparse.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/mm/sparse.c b/mm/sparse.c
> index fd13166..33810b6 100644
> --- a/mm/sparse.c
> +++ b/mm/sparse.c
> @@ -256,6 +256,10 @@ void __init memblocks_present(void)
>  	struct memblock_region *reg;
>  
>  	for_each_memblock(memory, reg) {
> +
> +		if (memblock_is_nomap(reg))
> +			continue;
> +
>  		memory_present(memblock_get_region_node(reg),
>  			       memblock_region_memory_base_pfn(reg),
>  			       memblock_region_memory_end_pfn(reg));
> -- 
> 2.7.4

-- 
Michal Hocko
SUSE Labs


      parent reply	other threads:[~2019-07-23  7:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-12  8:51 [PATCH] mm: sparse: Skip no-map regions in memblocks_present KarimAllah Ahmed
2019-07-12 23:09 ` Wei Yang
2019-07-13 13:53   ` Raslan, KarimAllah
2019-07-13 16:52     ` Wei Yang
2019-07-23  7:06 ` Michal Hocko [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=20190723070642.GC4552@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=bhe@redhat.com \
    --cc=cai@lca.pw \
    --cc=karahmed@amazon.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=logang@deltatee.com \
    --cc=osalvador@suse.de \
    --cc=pasha.tatashin@oracle.com \
    --cc=richard.weiyang@gmail.com \
    --cc=rppt@linux.ibm.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).