* [PATCH] mm: Remove mlock_count from struct page
@ 2025-09-03 19:10 Matthew Wilcox (Oracle)
2025-09-04 11:22 ` David Hildenbrand
0 siblings, 1 reply; 2+ messages in thread
From: Matthew Wilcox (Oracle) @ 2025-09-03 19:10 UTC (permalink / raw)
To: Andrew Morton; +Cc: Matthew Wilcox (Oracle), linux-mm, Hugh Dickins
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;
--
2.47.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] mm: Remove mlock_count from struct page
2025-09-03 19:10 [PATCH] mm: Remove mlock_count from struct page Matthew Wilcox (Oracle)
@ 2025-09-04 11:22 ` David Hildenbrand
0 siblings, 0 replies; 2+ messages in thread
From: David Hildenbrand @ 2025-09-04 11:22 UTC (permalink / raw)
To: Matthew Wilcox (Oracle), Andrew Morton; +Cc: linux-mm, Hugh Dickins
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-09-04 11:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-03 19:10 [PATCH] mm: Remove mlock_count from struct page Matthew Wilcox (Oracle)
2025-09-04 11:22 ` David Hildenbrand
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox