Commit 94ec2003 authored by Baolin Wang's avatar Baolin Wang Committed by Andrew Morton

mm: compaction: use the correct type of list for free pages

Use the page->buddy_list instead of page->lru to clarify the correct type
of list for free pages.

Link: https://lkml.kernel.org/r/b21cd8e2e32b9a1d9bc9e43ebf8acaf35e87f8df.1688715750.git.baolin.wang@linux.alibaba.comSigned-off-by: default avatarBaolin Wang <baolin.wang@linux.alibaba.com>
Acked-by: default avatarDavid Hildenbrand <david@redhat.com>
Cc: Huang, Ying <ying.huang@intel.com>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 809ef83c
...@@ -1500,7 +1500,7 @@ static void fast_isolate_freepages(struct compact_control *cc) ...@@ -1500,7 +1500,7 @@ static void fast_isolate_freepages(struct compact_control *cc)
spin_lock_irqsave(&cc->zone->lock, flags); spin_lock_irqsave(&cc->zone->lock, flags);
freelist = &area->free_list[MIGRATE_MOVABLE]; freelist = &area->free_list[MIGRATE_MOVABLE];
list_for_each_entry_reverse(freepage, freelist, lru) { list_for_each_entry_reverse(freepage, freelist, buddy_list) {
unsigned long pfn; unsigned long pfn;
order_scanned++; order_scanned++;
...@@ -1883,7 +1883,7 @@ static unsigned long fast_find_migrateblock(struct compact_control *cc) ...@@ -1883,7 +1883,7 @@ static unsigned long fast_find_migrateblock(struct compact_control *cc)
spin_lock_irqsave(&cc->zone->lock, flags); spin_lock_irqsave(&cc->zone->lock, flags);
freelist = &area->free_list[MIGRATE_MOVABLE]; freelist = &area->free_list[MIGRATE_MOVABLE];
list_for_each_entry(freepage, freelist, lru) { list_for_each_entry(freepage, freelist, buddy_list) {
unsigned long free_pfn; unsigned long free_pfn;
if (nr_scanned++ >= limit) { if (nr_scanned++ >= limit) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment