Skip to contentSkip to conversation

mm-sparse-set-section_nid_shift-to-6.patch removed from -mm tree

merged [email protected] 1 participant 1 message Sep 3, 2021

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: mm/sparse: set SECTION_NID_SHIFT to 6
has been removed from the -mm tree. Its filename was
mm-sparse-set-section_nid_shift-to-6.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Naoya Horiguchi <[email protected]>
Subject: mm/sparse: set SECTION_NID_SHIFT to 6

Currently SECTION_NID_SHIFT is set to 3, which is incorrect because bit 3 and 4 can be overlapped by sub-field for early NID, and can be unexpectedly set on NUMA systems. There are a few non-critical issues related to this:

- Having SECTION_TAINT_ZONE_DEVICE set for wrong sections forces pfn_to_online_page() through the slow path, but doesn't actually break the kernel.

- A kdump generation tool like makedumpfile uses this field to calculate the physical address to read. So wrong bits can make the tool access to wrong address and fail to create kdump. This can be avoided by the tool, so it's not critical.

To fix it, set SECTION_NID_SHIFT to 6 which is the minimum number of available bits of section flag field.

Fixes 1f90a3477df3 ("mm: teach pfn_to_online_page() about ZONE_DEVICE section collisions")
Cc Oscar Salvador <[email protected]>
Cc Wang Wensheng <[email protected]>
Cc Rui Xiang <[email protected]>
Cc Naoya Horiguchi <[email protected]>

---

 include/linux/mmzone.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/mmzone.h renamed from include/linux/mmzone.h~mm-sparse-set-section_nid_shift-to-6 +1 -1
@@ -1364,7 +1364,7 @@ extern size_t mem_section_usage_size(voi
 #define SECTION_TAINT_ZONE_DEVICE	(1UL<<4)
 #define SECTION_MAP_LAST_BIT		(1UL<<5)
 #define SECTION_MAP_MASK		(~(SECTION_MAP_LAST_BIT-1))
-#define SECTION_NID_SHIFT		3
+#define SECTION_NID_SHIFT		6
 
 static inline struct page *__section_mem_map_addr(struct mem_section *section)
 {

_

Patches currently in -mm which might be from [email protected] are