[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241206095951.98007-1-david@redhat.com>
Date: Fri, 6 Dec 2024 10:59:49 +0100
From: David Hildenbrand <david@...hat.com>
To: linux-kernel@...r.kernel.org
Cc: linux-mm@...ck.org,
David Hildenbrand <david@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Zi Yan <ziy@...dia.com>,
Vlastimil Babka <vbabka@...e.cz>,
Yu Zhao <yuzhao@...gle.com>
Subject: [PATCH v1 0/2] mm/page_alloc: rework conditional splitting >= pageblock_order pages when freeing
Looking into recent alloc_contig_range(__GFP_COMP) support, I realized that
we now unconditionally split up high-order pages on the page freeing path
to free in pageblock granularity, just to immediately let the buddy merge
them again in the common case.
Let's optimize for the common case (all pageblock migratetypes match), and
enable it only in configs where this is strictly required. Further, add
some comments that explain why this special casing is required at all.
Alongside, a fix for a stale comment in page isolation code.
Tested with runtime allocation of gigantic pages and virtio-mem.
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Zi Yan <ziy@...dia.com>
Cc: Vlastimil Babka <vbabka@...e.cz>
Cc: Yu Zhao <yuzhao@...gle.com>
David Hildenbrand (2):
mm/page_alloc: conditionally split > pageblock_order pages in
free_one_page() and move_freepages_block_isolate()
mm/page_isolation: fixup isolate_single_pageblock() comment regarding
splitting free pages
mm/page_alloc.c | 71 ++++++++++++++++++++++++++++++++++++---------
mm/page_isolation.c | 9 +++---
2 files changed, 61 insertions(+), 19 deletions(-)
--
2.47.1
Powered by blists - more mailing lists