linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@suse.com>
To: Oscar Salvador <osalvador@techadventures.net>
Cc: linux-mm@kvack.org, akpm@linux-foundation.org, vbabka@suse.cz
Subject: Re: [PATCH] mm: memory_hotplug: Remove unnecesary check from register_page_bootmem_info_section()
Date: Tue, 5 Dec 2017 15:44:22 +0100	[thread overview]
Message-ID: <20171205144422.ecg5k4n6zhyjm7ks@dhcp22.suse.cz> (raw)
In-Reply-To: <20171205143422.GA31458@techadventures.net>

On Tue 05-12-17 15:34:22, Oscar Salvador wrote:
> When we call register_page_bootmem_info_section() having CONFIG_SPARSEMEM_VMEMMAP enabled,
> we check if the pfn is valid.
> This check is redundant as we already checked this in register_page_bootmem_info_node()
> before calling register_page_bootmem_info_section(), so let's get rid of it.

there is quite a lot of legacy and confused code in memory hotplug. Some
of it is really subtle but this one is really straightforward

> Signed-off-by: Oscar Salvador <osalvador@techadventures.net>

Acked-by: Michal Hocko <mhocko@suse.com>

> ---
>  mm/memory_hotplug.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
> index d0856ab2f28d..7452a53b027f 100644
> --- a/mm/memory_hotplug.c
> +++ b/mm/memory_hotplug.c
> @@ -200,9 +200,6 @@ static void register_page_bootmem_info_section(unsigned long start_pfn)
>  	struct mem_section *ms;
>  	struct page *page, *memmap;
>  
> -	if (!pfn_valid(start_pfn))
> -		return;
> -
>  	section_nr = pfn_to_section_nr(start_pfn);
>  	ms = __nr_to_section(section_nr);
>  
> -- 
> 2.13.5
> 

-- 
Michal Hocko
SUSE Labs

--
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:[~2017-12-05 14:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-05 14:34 Oscar Salvador
2017-12-05 14:44 ` 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=20171205144422.ecg5k4n6zhyjm7ks@dhcp22.suse.cz \
    --to=mhocko@suse.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=osalvador@techadventures.net \
    --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