Skip to content

Commit

Permalink
mm: compaction: use the correct type of list for free pages
Browse files Browse the repository at this point in the history
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.com
Signed-off-by: Baolin Wang <[email protected]>
Acked-by: David Hildenbrand <[email protected]>
Cc: Huang, Ying <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Vlastimil Babka <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
  • Loading branch information
Baolin Wang authored and akpm00 committed Aug 18, 2023
1 parent 809ef83 commit 94ec200
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mm/compaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -1500,7 +1500,7 @@ static void fast_isolate_freepages(struct compact_control *cc)

spin_lock_irqsave(&cc->zone->lock, flags);
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;

order_scanned++;
Expand Down Expand Up @@ -1883,7 +1883,7 @@ static unsigned long fast_find_migrateblock(struct compact_control *cc)

spin_lock_irqsave(&cc->zone->lock, flags);
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;

if (nr_scanned++ >= limit) {
Expand Down

0 comments on commit 94ec200

Please sign in to comment.