mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
mm, compaction: check if a page has been captured before draining PCP pages
If a page has been captured then draining is unnecssary so check first for a captured page. Link: https://lkml.kernel.org/r/20230125134434.18017-3-mgorman@techsingularity.net Signed-off-by: Mel Gorman <mgorman@techsingularity.net> Cc: Chuyi Zhou <zhouchuyi@bytedance.com> Cc: Jiri Slaby <jirislaby@kernel.org> Cc: Maxim Levitsky <mlevitsk@redhat.com> Cc: Michal Hocko <mhocko@kernel.org> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Pedro Falcato <pedro.falcato@gmail.com> Cc: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
committed by
Andrew Morton
parent
48731c8436
commit
16b3be4034
@@ -2439,6 +2439,12 @@ compact_zone(struct compact_control *cc, struct capture_control *capc)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Stop if a page has been captured */
|
||||||
|
if (capc && capc->page) {
|
||||||
|
ret = COMPACT_SUCCESS;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
check_drain:
|
check_drain:
|
||||||
/*
|
/*
|
||||||
* Has the migration scanner moved away from the previous
|
* Has the migration scanner moved away from the previous
|
||||||
@@ -2457,12 +2463,6 @@ check_drain:
|
|||||||
last_migrated_pfn = 0;
|
last_migrated_pfn = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Stop if a page has been captured */
|
|
||||||
if (capc && capc->page) {
|
|
||||||
ret = COMPACT_SUCCESS;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
out:
|
out:
|
||||||
|
Reference in New Issue
Block a user