You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
revert "mm: fix-up zone present pages"
Revert commit 7f1290f2f2 ("mm: fix-up zone present pages")
That patch tried to fix a issue when calculating zone->present_pages,
but it caused a regression on 32bit systems with HIGHMEM. With that
change, reset_zone_present_pages() resets all zone->present_pages to
zero, and fixup_zone_present_pages() is called to recalculate
zone->present_pages when the boot allocator frees core memory pages into
buddy allocator. Because highmem pages are not freed by bootmem
allocator, all highmem zones' present_pages becomes zero.
Various options for improving the situation are being discussed but for
now, let's return to the 3.6 code.
Cc: Jianguo Wu <wujianguo@huawei.com>
Cc: Jiang Liu <jiang.liu@huawei.com>
Cc: Petr Tesarik <ptesarik@suse.cz>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Minchan Kim <minchan.kim@gmail.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: David Rientjes <rientjes@google.com>
Tested-by: Chris Clayton <chris2553@googlemail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
0f3c42f522
commit
5576646f3c
+1
-9
@@ -198,8 +198,6 @@ static unsigned long __init free_all_bootmem_core(bootmem_data_t *bdata)
|
||||
int order = ilog2(BITS_PER_LONG);
|
||||
|
||||
__free_pages_bootmem(pfn_to_page(start), order);
|
||||
fixup_zone_present_pages(page_to_nid(pfn_to_page(start)),
|
||||
start, start + BITS_PER_LONG);
|
||||
count += BITS_PER_LONG;
|
||||
start += BITS_PER_LONG;
|
||||
} else {
|
||||
@@ -210,9 +208,6 @@ static unsigned long __init free_all_bootmem_core(bootmem_data_t *bdata)
|
||||
if (vec & 1) {
|
||||
page = pfn_to_page(start + off);
|
||||
__free_pages_bootmem(page, 0);
|
||||
fixup_zone_present_pages(
|
||||
page_to_nid(page),
|
||||
start + off, start + off + 1);
|
||||
count++;
|
||||
}
|
||||
vec >>= 1;
|
||||
@@ -226,11 +221,8 @@ static unsigned long __init free_all_bootmem_core(bootmem_data_t *bdata)
|
||||
pages = bdata->node_low_pfn - bdata->node_min_pfn;
|
||||
pages = bootmem_bootmap_pages(pages);
|
||||
count += pages;
|
||||
while (pages--) {
|
||||
fixup_zone_present_pages(page_to_nid(page),
|
||||
page_to_pfn(page), page_to_pfn(page) + 1);
|
||||
while (pages--)
|
||||
__free_pages_bootmem(page++, 0);
|
||||
}
|
||||
|
||||
bdebug("nid=%td released=%lx\n", bdata - bootmem_node_data, count);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user