mm, sparse: fix typo in online_mem_sections
Subsystems (2)
PATCH 1/1 mm, sparse: fix typo in online_mem_sections
From: Michal Hocko <[email protected]>
online_mem_sections accidentally marks online only the first section in the given range. This is a typo which hasn't been noticed because I haven't tested large 2GB blocks previously. All users of pfn_to_online_page would get confused on the the rest of the pfn range in the block.
All we need to fix this is to use iterator (pfn) rather than start_pfn.
--- mm/sparse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/sparse.c +1 -1
@@ -626,7 +626,7 @@ void online_mem_sections(unsigned long start_pfn, unsigned long end_pfn)unsigned long pfn;for (pfn = start_pfn; pfn < end_pfn; pfn +=PAGES_PER_SECTION ) { -unsigned long section_nr =pfn_to_section_nr (start_pfn); +unsigned long section_nr =pfn_to_section_nr (pfn);struct mem_section *ms;/* onlining code should never touch invalid ranges */
Signature · 7 lines
2.14.1 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 5 lines · Michal Hocko
From: Michal Hocko <[email protected]>
online_mem_sectionsaccidentally marks online only the first section in the given range. This is a typo which hasn't been noticed because I haven't tested large 2GB blocks previously. All users of
Section sizes are normally less than 2GB. Could you please elaborate why this never got noticed before ?
Quoted 9 lines · Anshuman Khandual
Quoted 5 lines · Michal Hocko
From: Michal Hocko <[email protected]>
online_mem_sectionsaccidentally marks online only the first section in the given range. This is a typo which hasn't been noticed because I haven't tested large 2GB blocks previously. All users ofSection sizes are normally less than 2GB. Could you please elaborate why this never got noticed before ?
Section size is 128MB which is the default block size as well. So we have one section per block. But if the amount of memory is very large (64GB - see probe_memory_block_size) then we have a 2GB memory blocks so multiple sections per block.
Signature · 8 lines
Michal Hocko SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 8 lines · Michal Hocko
Quoted 7 lines · Anshuman Khandual
Quoted 5 lines · Michal Hocko
From: Michal Hocko <[email protected]>
online_mem_sectionsaccidentally marks online only the first section in the given range. This is a typo which hasn't been noticed because I haven't tested large 2GB blocks previously. All users of
Quoted 7 lines
Quoted 2 lines
Section sizes are normally less than 2GB. Could you please elaborate why this never got noticed before ?
Section size is 128MB which is the default block size as well. So we have one section per block. But if the amount of memory is very large (64GB - see
probe_memory_block_size) then we have a 2GB memory blocks so multiple sections per block.
And just to clarify. Not that 64G would be too large but the original patch has been merged in 4.13 so nobody probably managed to hit that _yet_.
Signature · 8 lines
Michal Hocko SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 12 lines · Michal Hocko
Quoted 11 lines · Michal Hocko
Quoted 9 lines · Anshuman Khandual
Quoted 5 lines · Michal Hocko
From: Michal Hocko <[email protected]>
online_mem_sectionsaccidentally marks online only the first section in the given range. This is a typo which hasn't been noticed because I haven't tested large 2GB blocks previously. All users ofSection sizes are normally less than 2GB. Could you please elaborate why this never got noticed before ?
Quoted 8 lines
Quoted 4 lines
Section size is 128MB which is the default block size as well. So we have one section per block. But if the amount of memory is very large (64GB - see
probe_memory_block_size) then we have a 2GB memory blocks so multiple sections per block.And just to clarify. Not that 64G would be too large but the original patch has been merged in 4.13 so nobody probably managed to hit that _yet_.
Got it. Section size is 16MB and block size is 256MB on most of the POWER platforms. Hence this could have affected them as well.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 8 lines · Michal Hocko
From: Michal Hocko <[email protected]>
online_mem_sectionsaccidentally marks online only the first section in the given range. This is a typo which hasn't been noticed because I haven't tested large 2GB blocks previously. All users ofpfn_to_online_pagewould get confused on the the rest of the pfn range in the block.
Quoted 5 lines
All we need to fix this is to use iterator (pfn) rather than
start_pfn.Fixes 2d070eab2e82 ("mm: consider zone which is not fully populated to have holes")Cc stableSigned-off-by Michal Hocko <[email protected]>
Quoted 18 lines
--- mm/sparse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)mm/sparse.c +1
-1@@ -626,7 +626,7 @@ void online_mem_sections(unsigned long start_pfn, unsigned long end_pfn)unsigned long pfn;for (pfn = start_pfn; pfn < end_pfn; pfn +=PAGES_PER_SECTION ) { -unsigned long section_nr =pfn_to_section_nr (start_pfn); +unsigned long section_nr =pfn_to_section_nr (pfn);struct mem_section *ms;/* onlining code should never touch invalid ranges */