BACKPORT: 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: I9a9dedfa7f0a0a9f18e8da11b5b6b6940fbf0fb2 Signed-off-by:Johannes Weiner <hannes@cmpxchg.org> Suggested-by:
Vlastimil Babka <vbabka@suse.cz> Tested-by:
"Huang, Ying" <ying.huang@intel.com> Reviewed-by:
Vlastimil Babka <vbabka@suse.cz> Tested-by:
Baolin 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:
Andrew Morton <akpm@linux-foundation.org> (cherry picked from commit 9cbe97ba) Bug: 420700629 [ Remove duplicated code for freeing migratetype_isolate; Drop !pcp_allowes_order() block, order is always 0 - Kalesh Singh ] Signed-off-by:
Kalesh Singh <kaleshsingh@google.com>
Loading
Please sign in to comment