+ mm-sparse-use-__nr_to_sectionsection_nr-to-get-mem_section.patch added to -mm tree

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

 



The patch titled
     Subject: mm/sparse.c: use __nr_to_section(section_nr) to get mem_section
has been added to the -mm tree.  Its filename is
     mm-sparse-use-__nr_to_sectionsection_nr-to-get-mem_section.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/mm-sparse-use-__nr_to_sectionsection_nr-to-get-mem_section.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/mm-sparse-use-__nr_to_sectionsection_nr-to-get-mem_section.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Wei Yang <richardw.yang@xxxxxxxxxxxxxxx>
Subject: mm/sparse.c: use __nr_to_section(section_nr) to get mem_section

__pfn_to_section is defined as __nr_to_section(pfn_to_section_nr(pfn)).

Since we already get section_nr, it is not necessary to get mem_section
from start_pfn. By doing so, we reduce one redundant operation.

Link: http://lkml.kernel.org/r/20190809010242.29797-1-richardw.yang@xxxxxxxxxxxxxxx
Signed-off-by: Wei Yang <richardw.yang@xxxxxxxxxxxxxxx>
Reviewed-by: Anshuman Khandual <anshuman.khandual@xxxxxxx>
Tested-by: Anshuman Khandual <anshuman.khandual@xxxxxxx>
Cc: Oscar Salvador <osalvador@xxxxxxx>
Cc: Pavel Tatashin <pasha.tatashin@xxxxxxxxxx>
Cc: Michal Hocko <mhocko@xxxxxxxx>
Cc: David Hildenbrand <david@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/sparse.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/mm/sparse.c~mm-sparse-use-__nr_to_sectionsection_nr-to-get-mem_section
+++ a/mm/sparse.c
@@ -877,7 +877,7 @@ int __meminit sparse_add_section(int nid
 	 */
 	page_init_poison(pfn_to_page(start_pfn), sizeof(struct page) * nr_pages);
 
-	ms = __pfn_to_section(start_pfn);
+	ms = __nr_to_section(section_nr);
 	set_section_nid(section_nr, nid);
 	section_mark_present(ms);
 
_

Patches currently in -mm which might be from richardw.yang@xxxxxxxxxxxxxxx are

mm-remove-redundant-assignment-of-entry.patch
mm-sparse-use-__nr_to_sectionsection_nr-to-get-mem_section.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux