mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-04 08:17:46 +00:00
mm/compaction: avoid unneeded pageblock_end_pfn when no_set_skip_hint is set
Move pageblock_end_pfn after no_set_skip_hint check to avoid unneeded pageblock_end_pfn if no_set_skip_hint is set. Link: https://lkml.kernel.org/r/20230721150957.2058634-3-shikemeng@huawei.com Signed-off-by: Kemeng Shi <shikemeng@huawei.com> Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com> Reviewed-by: David Hildenbrand <david@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
e6bd14eca2
commit
3c099a2b0b
1 changed files with 2 additions and 2 deletions
|
@ -463,12 +463,12 @@ static void update_cached_migrate(struct compact_control *cc, unsigned long pfn)
|
|||
{
|
||||
struct zone *zone = cc->zone;
|
||||
|
||||
pfn = pageblock_end_pfn(pfn);
|
||||
|
||||
/* Set for isolation rather than compaction */
|
||||
if (cc->no_set_skip_hint)
|
||||
return;
|
||||
|
||||
pfn = pageblock_end_pfn(pfn);
|
||||
|
||||
if (pfn > zone->compact_cached_migrate_pfn[0])
|
||||
zone->compact_cached_migrate_pfn[0] = pfn;
|
||||
if (cc->mode != MIGRATE_ASYNC &&
|
||||
|
|
Loading…
Add table
Reference in a new issue