From: David Hildenbrand <david@redhat.com>
To: "Matthew Wilcox (Oracle)" <willy@infradead.org>,
Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org, Hugh Dickins <hughd@google.com>
Subject: Re: [PATCH] mm: Remove mlock_count from struct page
Date: Thu, 4 Sep 2025 13:22:53 +0200 [thread overview]
Message-ID: <1607fb76-ee10-4ee8-ad9a-ffc99987cf55@redhat.com> (raw)
In-Reply-To: <20250903191041.1630338-1-willy@infradead.org>
On 03.09.25 21:10, Matthew Wilcox (Oracle) wrote:
> All users now use folio->mlock_count so we can remove this element of
> struct page. Move the useful comments over to struct folio.
>
> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
> ---
> include/linux/mm_types.h | 10 ++--------
> 1 file changed, 2 insertions(+), 8 deletions(-)
>
> diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
> index d934a3a5b443..34205313a839 100644
> --- a/include/linux/mm_types.h
> +++ b/include/linux/mm_types.h
> @@ -94,14 +94,6 @@ struct page {
> union {
> struct list_head lru;
>
> - /* Or, for the Unevictable "LRU list" slot */
> - struct {
> - /* Always even, to negate PageTail */
> - void *__filler;
> - /* Count page's or folio's mlocks */
> - unsigned int mlock_count;
> - };
> -
> /* Or, free page */
> struct list_head buddy_list;
> struct list_head pcp_list;
> @@ -391,7 +383,9 @@ struct folio {
> union {
> struct list_head lru;
> /* private: avoid cluttering the output */
> + /* For the Unevictable "LRU list" slot */
> struct {
> + /* Avoid compound_head */
> void *__filler;
> /* public: */
> unsigned int mlock_count;
mm/mlock.c: * will call mlock_vma_folio() and raise page's mlock_count:
Should probably fixed up as well.
Documentation/mm/unevictable-lru.rst also seems to talk about pages and
mlock_count, but that probably needs a bigger rework to only talk about
folios.
--
Cheers
David / dhildenb
prev parent reply other threads:[~2025-09-04 11:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-03 19:10 Matthew Wilcox (Oracle)
2025-09-04 11:22 ` David Hildenbrand [this message]
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=1607fb76-ee10-4ee8-ad9a-ffc99987cf55@redhat.com \
--to=david@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=hughd@google.com \
--cc=linux-mm@kvack.org \
--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