+ resource-use-pfn_up-pfn_down-in-walk_system_ram_range.patch added to -mm tree

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

 



The patch titled
     Subject: resource: use PFN_UP / PFN_DOWN in walk_system_ram_range()
has been added to the -mm tree.  Its filename is
     resource-use-pfn_up-pfn_down-in-walk_system_ram_range.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/resource-use-pfn_up-pfn_down-in-walk_system_ram_range.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/resource-use-pfn_up-pfn_down-in-walk_system_ram_range.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: David Hildenbrand <david@xxxxxxxxxx>
Subject: resource: use PFN_UP / PFN_DOWN in walk_system_ram_range()

Patch series "mm/memory_hotplug: online_pages() cleanups".

Some cleanups (+ one fix for a special case) in the context of
online_pages().  Hope I am not missing something obvious.


This patch (of 4)):

This makes it clearer that we will never call func() with duplicate PFNs
in case we have multiple sub-page memory resources.  All unaligned parts
of PFNs are completely discarded.

Link: http://lkml.kernel.org/r/20190809125701.3316-2-david@xxxxxxxxxx
Signed-off-by: David Hildenbrand <david@xxxxxxxxxx>
Cc: Dan Williams <dan.j.williams@xxxxxxxxx>
Cc: Borislav Petkov <bp@xxxxxxx>
Cc: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>
Cc: Nadav Amit <namit@xxxxxxxxxx>
Cc: Wei Yang <richardw.yang@xxxxxxxxxxxxxxx>
Cc: Oscar Salvador <osalvador@xxxxxxx>
Cc: Arun KS <arunks@xxxxxxxxxxxxxx>
Cc: Michal Hocko <mhocko@xxxxxxxx>
Cc: Pavel Tatashin <pasha.tatashin@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 kernel/resource.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/kernel/resource.c~resource-use-pfn_up-pfn_down-in-walk_system_ram_range
+++ a/kernel/resource.c
@@ -487,8 +487,8 @@ int walk_system_ram_range(unsigned long
 	while (start < end &&
 	       !find_next_iomem_res(start, end, flags, IORES_DESC_NONE,
 				    false, &res)) {
-		pfn = (res.start + PAGE_SIZE - 1) >> PAGE_SHIFT;
-		end_pfn = (res.end + 1) >> PAGE_SHIFT;
+		pfn = PFN_UP(res.start);
+		end_pfn = PFN_DOWN(res.end + 1);
 		if (end_pfn > pfn)
 			ret = (*func)(pfn, end_pfn - pfn, arg);
 		if (ret)
_

Patches currently in -mm which might be from david@xxxxxxxxxx are

mm-memory_hotplug-remove-move_pfn_range.patch
drivers-base-nodec-simplify-unregister_memory_block_under_nodes.patch
drivers-base-memoryc-fixup-documentation-of-removable-phys_index-block_size_bytes.patch
driver-base-memoryc-validate-memory-block-size-early.patch
resource-use-pfn_up-pfn_down-in-walk_system_ram_range.patch
mm-memory_hotplug-handle-unaligned-start-and-nr_pages-in-online_pages_blocks.patch
mm-memory_hotplug-simplify-online_pages_range.patch
mm-memory_hotplug-online_pages-cannot-be-0-in-online_pages.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