From: David Hildenbrand <david@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: linux-mm@kvack.org, David Hildenbrand <david@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>,
Zi Yan <ziy@nvidia.com>, Vlastimil Babka <vbabka@suse.cz>,
Yu Zhao <yuzhao@google.com>
Subject: [PATCH v1 0/2] mm/page_alloc: rework conditional splitting >= pageblock_order pages when freeing
Date: Fri, 6 Dec 2024 10:59:49 +0100 [thread overview]
Message-ID: <20241206095951.98007-1-david@redhat.com> (raw)
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@linux-foundation.org>
Cc: Zi Yan <ziy@nvidia.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Yu Zhao <yuzhao@google.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
next reply other threads:[~2024-12-06 10:00 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-06 9:59 David Hildenbrand [this message]
2024-12-06 9:59 ` [PATCH v1 1/2] mm/page_alloc: conditionally split > pageblock_order pages in free_one_page() and move_freepages_block_isolate() David Hildenbrand
2024-12-06 16:58 ` Zi Yan
2024-12-07 6:48 ` Yu Zhao
2024-12-09 19:01 ` Vlastimil Babka
2024-12-09 19:23 ` Zi Yan
2024-12-09 21:35 ` David Hildenbrand
2024-12-09 21:42 ` Zi Yan
2024-12-09 22:10 ` David Hildenbrand
2024-12-09 21:36 ` Vlastimil Babka
2024-12-10 9:39 ` David Hildenbrand
2024-12-06 9:59 ` [PATCH v1 2/2] mm/page_isolation: fixup isolate_single_pageblock() comment regarding splitting free pages David Hildenbrand
2024-12-06 16:59 ` Zi Yan
2024-12-09 22:13 ` Vlastimil Babka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241206095951.98007-1-david@redhat.com \
--to=david@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=vbabka@suse.cz \
--cc=yuzhao@google.com \
--cc=ziy@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox