Commit cb610236 authored by Johannes Weiner's avatar Johannes Weiner Committed by Kalesh Singh
Browse files

UPSTREAM: mm: page_alloc: optimize free_unref_folios()

Move direct freeing of isolated pages to the lock-breaking block in the
second loop.  This saves an unnecessary migratetype reassessment.

Minor comment and local variable scoping cleanups.

Link: https://lkml.kernel.org/r/20240320180429.678181-3-hannes@cmpxchg.org


Change-Id: I480456d59c272cfc8470ac5d0644cc45bf684954
Signed-off-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
Suggested-by: default avatarVlastimil Babka <vbabka@suse.cz>
Tested-by: default avatar"Huang, Ying" <ying.huang@intel.com>
Reviewed-by: default avatarVlastimil Babka <vbabka@suse.cz>
Tested-by: default avatarBaolin Wang <baolin.wang@linux.alibaba.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Zi Yan <ziy@nvidia.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
(cherry picked from commit 9cbe97ba)
Bug: 420771453
Signed-off-by: default avatarKalesh Singh <kaleshsingh@google.com>
parent 606130da
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment