From: Vlastimil Babka <vbabka@suse.cz>
To: Christoph Lameter <cl@linux.com>, David Rientjes <rientjes@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Roman Gushchin <roman.gushchin@linux.dev>,
Harry Yoo <harry.yoo@oracle.com>,
Matthew Wilcox <willy@infradead.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Vlastimil Babka <vbabka@suse.cz>
Subject: [PATCH 0/2] frozen pages for large kmalloc
Date: Thu, 29 May 2025 10:56:25 +0200 [thread overview]
Message-ID: <20250529-frozen-pages-for-large-kmalloc-v1-0-b3aa52a8fa17@suse.cz> (raw)
In [1] I have suggested we start warning for get_page() done on large
kmalloc pages as the first step to convert them to frozen pages.
We exposed to -next and indeed got such a warning [2]. But it turns out
the code is using sendpage_ok() and thus would avoid the get_page() if
the page was actually frozen.
So in this version, freeze the large kmalloc pages at the same time as
adding the warnings and refusals to get_page/put_page() on large kmalloc
pages, the same as we do for slab pages - in patch 1.
While doing that I've noticed that large kmalloc doesn't observe numa
policies, while the rest of the allocator does. So I've done that in
patch 2 as I assume Christopher would welcome this change.
Given the timing I would expose this to -next after the current merge
window closes, thus towards 6.17.
[1] https://lore.kernel.org/all/20250417074102.4543-2-vbabka@suse.cz/
[2] https://lore.kernel.org/all/202505221248.595a9117-lkp@intel.com/
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
---
Vlastimil Babka (2):
mm, slab: use frozen pages for large kmalloc
mm, slab: support NUMA policy for large kmalloc
include/linux/mm.h | 4 +++-
mm/slub.c | 9 +++++++--
2 files changed, 10 insertions(+), 3 deletions(-)
---
base-commit: 9c32cda43eb78f78c73aee4aa344b777714e259b
change-id: 20250529-frozen-pages-for-large-kmalloc-bd4d2522e52b
Best regards,
--
Vlastimil Babka <vbabka@suse.cz>
next reply other threads:[~2025-05-29 8:56 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-29 8:56 Vlastimil Babka [this message]
2025-05-29 8:56 ` [PATCH 1/2] mm, slab: use " Vlastimil Babka
2025-05-29 15:46 ` Roman Gushchin
2025-05-30 16:59 ` Matthew Wilcox
2025-05-30 4:17 ` Harry Yoo
2025-05-29 8:56 ` [PATCH 2/2] mm, slab: support NUMA policy " Vlastimil Babka
2025-05-29 14:57 ` Christoph Lameter (Ampere)
2025-05-29 15:59 ` Vlastimil Babka
2025-05-30 19:05 ` Christoph Lameter (Ampere)
2025-06-02 8:24 ` Vlastimil Babka
2025-05-30 7:11 ` Harry Yoo
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=20250529-frozen-pages-for-large-kmalloc-v1-0-b3aa52a8fa17@suse.cz \
--to=vbabka@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=harry.yoo@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rientjes@google.com \
--cc=roman.gushchin@linux.dev \
--cc=willy@infradead.org \
/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