Re: [PATCH 2/2] mm/memory_hotplug: remove duplicate call for set_page_links

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 16 Jun 2017 17:23:35 +0800 Wei Yang <richard.weiyang@xxxxxxxxx> wrote:

> In function move_pfn_range_to_zone(), memmap_init_zone() will call
> set_page_links for each page.

Well, no.  There are several types of pfn's for which
memmap_init_zone() will not call
__init_single_page()->set_page_links().  Probably the code is OK, as
those are pretty screwy pfn types.  But I'd like to see some
confirmation that this patch is OK for all such pfns, now and in the
future?

> This means we don't need to call it on each
> page explicitly.
> 
> This patch just removes the loop.
> 
> ...
>
> --- a/mm/memory_hotplug.c
> +++ b/mm/memory_hotplug.c
> @@ -914,10 +914,6 @@ void __ref move_pfn_range_to_zone(struct zone *zone,
>  	 * are reserved so nobody should be touching them so we should be safe
>  	 */
>  	memmap_init_zone(nr_pages, nid, zone_idx(zone), start_pfn, MEMMAP_HOTPLUG);
> -	for (i = 0; i < nr_pages; i++) {
> -		unsigned long pfn = start_pfn + i;
> -		set_page_links(pfn_to_page(pfn), zone_idx(zone), nid, pfn);
> -	}
>  
>  	set_zone_contiguous(zone);
>  }

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]
  Powered by Linux