* [PATCH 0/2] mm: remove three unused helpers from mm.h
@ 2026-09-01 12:59 Tal Zussman
2026-09-01 12:59 ` [PATCH 1/2] mm: remove unused mark_page_reserved() Tal Zussman
2026-09-01 12:59 ` [PATCH 2/2] mm: remove unused totalram_pages_inc() and totalram_pages_dec() Tal Zussman
0 siblings, 2 replies; 9+ messages in thread
From: Tal Zussman @ 2026-09-01 12:59 UTC (permalink / raw)
To: Andrew Morton, David Hildenbrand, Lorenzo Stoakes,
Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko
Cc: linux-mm, linux-kernel, Tal Zussman
I happened to notice these were unused. Two of them are relatively
recently unused, and one has been unused for a few years. Remove them.
---
Tal Zussman (2):
mm: remove unused mark_page_reserved()
mm: remove unused totalram_pages_inc() and totalram_pages_dec()
include/linux/mm.h | 16 ----------------
1 file changed, 16 deletions(-)
---
base-commit: ead700ca770c82167af32622cf8b68c9f87c3c7c
change-id: 20260901-mm-remove-unused-helpers-33056049864c
Best regards,
--
Tal Zussman <tz2294@columbia.edu>
^ permalink raw reply [flat|nested] 9+ messages in thread* [PATCH 1/2] mm: remove unused mark_page_reserved()
2026-09-01 12:59 [PATCH 0/2] mm: remove three unused helpers from mm.h Tal Zussman
@ 2026-09-01 12:59 ` Tal Zussman
2026-09-01 14:05 ` Lorenzo Stoakes (ARM)
2026-09-01 16:14 ` Mike Rapoport
2026-09-01 12:59 ` [PATCH 2/2] mm: remove unused totalram_pages_inc() and totalram_pages_dec() Tal Zussman
1 sibling, 2 replies; 9+ messages in thread
From: Tal Zussman @ 2026-09-01 12:59 UTC (permalink / raw)
To: Andrew Morton, David Hildenbrand, Lorenzo Stoakes,
Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko
Cc: linux-mm, linux-kernel, Tal Zussman
mark_page_reserved() lost its last caller in commit 6215d9f4470f ("arch,
mm: consolidate empty_zero_page"). Remove it.
Signed-off-by: Tal Zussman <tz2294@columbia.edu>
---
include/linux/mm.h | 6 ------
1 file changed, 6 deletions(-)
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 1b28e6fc8d5d..e3736c42c4db 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -4080,12 +4080,6 @@ static inline void free_reserved_page(struct page *page)
free_reserved_pages(page, 0);
}
-static inline void mark_page_reserved(struct page *page)
-{
- SetPageReserved(page);
- adjust_managed_page_count(page, -1);
-}
-
static inline void free_reserved_ptdesc(struct ptdesc *pt)
{
free_reserved_page(ptdesc_page(pt));
--
2.39.5
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [PATCH 1/2] mm: remove unused mark_page_reserved()
2026-09-01 12:59 ` [PATCH 1/2] mm: remove unused mark_page_reserved() Tal Zussman
@ 2026-09-01 14:05 ` Lorenzo Stoakes (ARM)
2026-09-01 16:14 ` Mike Rapoport
1 sibling, 0 replies; 9+ messages in thread
From: Lorenzo Stoakes (ARM) @ 2026-09-01 14:05 UTC (permalink / raw)
To: Tal Zussman
Cc: Andrew Morton, David Hildenbrand, Liam R. Howlett,
Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko,
linux-mm, linux-kernel
On Tue, Sep 01, 2026 at 08:59:19AM -0400, Tal Zussman wrote:
> mark_page_reserved() lost its last caller in commit 6215d9f4470f ("arch,
> mm: consolidate empty_zero_page"). Remove it.
>
> Signed-off-by: Tal Zussman <tz2294@columbia.edu>
LGTM, so:
Reviewed-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
> ---
> include/linux/mm.h | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/include/linux/mm.h b/include/linux/mm.h
> index 1b28e6fc8d5d..e3736c42c4db 100644
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -4080,12 +4080,6 @@ static inline void free_reserved_page(struct page *page)
> free_reserved_pages(page, 0);
> }
>
> -static inline void mark_page_reserved(struct page *page)
> -{
> - SetPageReserved(page);
> - adjust_managed_page_count(page, -1);
> -}
> -
> static inline void free_reserved_ptdesc(struct ptdesc *pt)
> {
> free_reserved_page(ptdesc_page(pt));
>
> --
> 2.39.5
>
--
Cheers, Lorenzo
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH 1/2] mm: remove unused mark_page_reserved()
2026-09-01 12:59 ` [PATCH 1/2] mm: remove unused mark_page_reserved() Tal Zussman
2026-09-01 14:05 ` Lorenzo Stoakes (ARM)
@ 2026-09-01 16:14 ` Mike Rapoport
1 sibling, 0 replies; 9+ messages in thread
From: Mike Rapoport @ 2026-09-01 16:14 UTC (permalink / raw)
To: Tal Zussman
Cc: Andrew Morton, David Hildenbrand, Lorenzo Stoakes,
Liam R. Howlett, Vlastimil Babka, Suren Baghdasaryan,
Michal Hocko, linux-mm, linux-kernel
On Tue, Sep 01, 2026 at 08:59:19AM -0400, Tal Zussman wrote:
> mark_page_reserved() lost its last caller in commit 6215d9f4470f ("arch,
> mm: consolidate empty_zero_page"). Remove it.
>
> Signed-off-by: Tal Zussman <tz2294@columbia.edu>
Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
> ---
> include/linux/mm.h | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/include/linux/mm.h b/include/linux/mm.h
> index 1b28e6fc8d5d..e3736c42c4db 100644
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -4080,12 +4080,6 @@ static inline void free_reserved_page(struct page *page)
> free_reserved_pages(page, 0);
> }
>
> -static inline void mark_page_reserved(struct page *page)
> -{
> - SetPageReserved(page);
> - adjust_managed_page_count(page, -1);
> -}
> -
> static inline void free_reserved_ptdesc(struct ptdesc *pt)
> {
> free_reserved_page(ptdesc_page(pt));
>
> --
> 2.39.5
>
--
Sincerely yours,
Mike.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 2/2] mm: remove unused totalram_pages_inc() and totalram_pages_dec()
2026-09-01 12:59 [PATCH 0/2] mm: remove three unused helpers from mm.h Tal Zussman
2026-09-01 12:59 ` [PATCH 1/2] mm: remove unused mark_page_reserved() Tal Zussman
@ 2026-09-01 12:59 ` Tal Zussman
2026-09-01 14:06 ` Lorenzo Stoakes (ARM)
2026-09-01 16:14 ` Mike Rapoport
1 sibling, 2 replies; 9+ messages in thread
From: Tal Zussman @ 2026-09-01 12:59 UTC (permalink / raw)
To: Andrew Morton, David Hildenbrand, Lorenzo Stoakes,
Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko
Cc: linux-mm, linux-kernel, Tal Zussman
totalram_pages_inc() and totalram_pages_dec() have had no callers since
commit 7fbc5e26123e ("memblock: extract page freeing from
free_reserved_area() into a helper") and commit 287b89773d81
("powerpc/pseries/cmm: Use adjust_managed_page_count() insted of
totalram_pages_*"), respectively. Remove them.
Signed-off-by: Tal Zussman <tz2294@columbia.edu>
---
include/linux/mm.h | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/include/linux/mm.h b/include/linux/mm.h
index e3736c42c4db..c105a3758915 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -57,16 +57,6 @@ static inline unsigned long totalram_pages(void)
return (unsigned long)atomic_long_read(&_totalram_pages);
}
-static inline void totalram_pages_inc(void)
-{
- atomic_long_inc(&_totalram_pages);
-}
-
-static inline void totalram_pages_dec(void)
-{
- atomic_long_dec(&_totalram_pages);
-}
-
static inline void totalram_pages_add(long count)
{
atomic_long_add(count, &_totalram_pages);
--
2.39.5
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [PATCH 2/2] mm: remove unused totalram_pages_inc() and totalram_pages_dec()
2026-09-01 12:59 ` [PATCH 2/2] mm: remove unused totalram_pages_inc() and totalram_pages_dec() Tal Zussman
@ 2026-09-01 14:06 ` Lorenzo Stoakes (ARM)
2026-09-01 14:29 ` Tal Zussman
2026-09-01 16:14 ` Mike Rapoport
1 sibling, 1 reply; 9+ messages in thread
From: Lorenzo Stoakes (ARM) @ 2026-09-01 14:06 UTC (permalink / raw)
To: Tal Zussman
Cc: Andrew Morton, David Hildenbrand, Liam R. Howlett,
Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko,
linux-mm, linux-kernel
On Tue, Sep 01, 2026 at 08:59:20AM -0400, Tal Zussman wrote:
> totalram_pages_inc() and totalram_pages_dec() have had no callers since
> commit 7fbc5e26123e ("memblock: extract page freeing from
> free_reserved_area() into a helper") and commit 287b89773d81
> ("powerpc/pseries/cmm: Use adjust_managed_page_count() insted of
> totalram_pages_*"), respectively. Remove them.
>
> Signed-off-by: Tal Zussman <tz2294@columbia.edu>
With additional change requested below addressed, LGTM and:
Reviewed-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
> ---
> include/linux/mm.h | 10 ----------
> 1 file changed, 10 deletions(-)
>
> diff --git a/include/linux/mm.h b/include/linux/mm.h
> index e3736c42c4db..c105a3758915 100644
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -57,16 +57,6 @@ static inline unsigned long totalram_pages(void)
> return (unsigned long)atomic_long_read(&_totalram_pages);
> }
>
> -static inline void totalram_pages_inc(void)
> -{
> - atomic_long_inc(&_totalram_pages);
> -}
I also see totalram_pages_inc() in tools/include/linux/mm.h - could you remove
it too to keep things consistent? Thanks!
> -
> -static inline void totalram_pages_dec(void)
> -{
> - atomic_long_dec(&_totalram_pages);
> -}
> -
> static inline void totalram_pages_add(long count)
> {
> atomic_long_add(count, &_totalram_pages);
>
> --
> 2.39.5
>
--
Cheers, Lorenzo
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH 2/2] mm: remove unused totalram_pages_inc() and totalram_pages_dec()
2026-09-01 14:06 ` Lorenzo Stoakes (ARM)
@ 2026-09-01 14:29 ` Tal Zussman
2026-09-01 14:42 ` Lorenzo Stoakes (ARM)
0 siblings, 1 reply; 9+ messages in thread
From: Tal Zussman @ 2026-09-01 14:29 UTC (permalink / raw)
To: Lorenzo Stoakes (ARM)
Cc: Andrew Morton, David Hildenbrand, Liam R. Howlett,
Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko,
linux-mm, linux-kernel
On 9/1/26 5:06 PM, Lorenzo Stoakes (ARM) wrote:
> On Tue, Sep 01, 2026 at 08:59:20AM -0400, Tal Zussman wrote:
>> totalram_pages_inc() and totalram_pages_dec() have had no callers since
>> commit 7fbc5e26123e ("memblock: extract page freeing from
>> free_reserved_area() into a helper") and commit 287b89773d81
>> ("powerpc/pseries/cmm: Use adjust_managed_page_count() insted of
>> totalram_pages_*"), respectively. Remove them.
>>
>> Signed-off-by: Tal Zussman <tz2294@columbia.edu>
>
> With additional change requested below addressed, LGTM and:
>
> Reviewed-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
>
Thanks!
>> ---
>> include/linux/mm.h | 10 ----------
>> 1 file changed, 10 deletions(-)
>>
>> diff --git a/include/linux/mm.h b/include/linux/mm.h
>> index e3736c42c4db..c105a3758915 100644
>> --- a/include/linux/mm.h
>> +++ b/include/linux/mm.h
>> @@ -57,16 +57,6 @@ static inline unsigned long totalram_pages(void)
>> return (unsigned long)atomic_long_read(&_totalram_pages);
>> }
>>
>> -static inline void totalram_pages_inc(void)
>> -{
>> - atomic_long_inc(&_totalram_pages);
>> -}
>
> I also see totalram_pages_inc() in tools/include/linux/mm.h - could you remove
> it too to keep things consistent? Thanks!
>
Yes, will do. For some reason I was under the impression that tools headers
are generally synced separately as needed, but that's clearly not the case...
Maybe I was thinking of the tools uapi headers.
>> -
>> -static inline void totalram_pages_dec(void)
>> -{
>> - atomic_long_dec(&_totalram_pages);
>> -}
>> -
>> static inline void totalram_pages_add(long count)
>> {
>> atomic_long_add(count, &_totalram_pages);
>>
>> --
>> 2.39.5
>>
>
> --
> Cheers, Lorenzo
>
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH 2/2] mm: remove unused totalram_pages_inc() and totalram_pages_dec()
2026-09-01 14:29 ` Tal Zussman
@ 2026-09-01 14:42 ` Lorenzo Stoakes (ARM)
0 siblings, 0 replies; 9+ messages in thread
From: Lorenzo Stoakes (ARM) @ 2026-09-01 14:42 UTC (permalink / raw)
To: Tal Zussman
Cc: Andrew Morton, David Hildenbrand, Liam R. Howlett,
Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko,
linux-mm, linux-kernel
On Tue, Sep 01, 2026 at 10:29:38AM -0400, Tal Zussman wrote:
> On 9/1/26 5:06 PM, Lorenzo Stoakes (ARM) wrote:
> > I also see totalram_pages_inc() in tools/include/linux/mm.h - could you remove
> > it too to keep things consistent? Thanks!
> >
>
> Yes, will do. For some reason I was under the impression that tools headers
> are generally synced separately as needed, but that's clearly not the case...
> Maybe I was thinking of the tools uapi headers.
Well they usually are, or should be (kinda) sometimes. But since this is being
removed it's a good point at which to sync at least this known-no-longer-needed
bit :)
--
Cheers, Lorenzo
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] mm: remove unused totalram_pages_inc() and totalram_pages_dec()
2026-09-01 12:59 ` [PATCH 2/2] mm: remove unused totalram_pages_inc() and totalram_pages_dec() Tal Zussman
2026-09-01 14:06 ` Lorenzo Stoakes (ARM)
@ 2026-09-01 16:14 ` Mike Rapoport
1 sibling, 0 replies; 9+ messages in thread
From: Mike Rapoport @ 2026-09-01 16:14 UTC (permalink / raw)
To: Tal Zussman
Cc: Andrew Morton, David Hildenbrand, Lorenzo Stoakes,
Liam R. Howlett, Vlastimil Babka, Suren Baghdasaryan,
Michal Hocko, linux-mm, linux-kernel
On Tue, Sep 01, 2026 at 08:59:20AM -0400, Tal Zussman wrote:
> totalram_pages_inc() and totalram_pages_dec() have had no callers since
> commit 7fbc5e26123e ("memblock: extract page freeing from
> free_reserved_area() into a helper") and commit 287b89773d81
> ("powerpc/pseries/cmm: Use adjust_managed_page_count() insted of
> totalram_pages_*"), respectively. Remove them.
>
> Signed-off-by: Tal Zussman <tz2294@columbia.edu>
Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
> ---
> include/linux/mm.h | 10 ----------
> 1 file changed, 10 deletions(-)
>
> diff --git a/include/linux/mm.h b/include/linux/mm.h
> index e3736c42c4db..c105a3758915 100644
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -57,16 +57,6 @@ static inline unsigned long totalram_pages(void)
> return (unsigned long)atomic_long_read(&_totalram_pages);
> }
>
> -static inline void totalram_pages_inc(void)
> -{
> - atomic_long_inc(&_totalram_pages);
> -}
> -
> -static inline void totalram_pages_dec(void)
> -{
> - atomic_long_dec(&_totalram_pages);
> -}
> -
> static inline void totalram_pages_add(long count)
> {
> atomic_long_add(count, &_totalram_pages);
>
> --
> 2.39.5
>
--
Sincerely yours,
Mike.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2026-09-01 16:14 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-01 12:59 [PATCH 0/2] mm: remove three unused helpers from mm.h Tal Zussman
2026-09-01 12:59 ` [PATCH 1/2] mm: remove unused mark_page_reserved() Tal Zussman
2026-09-01 14:05 ` Lorenzo Stoakes (ARM)
2026-09-01 16:14 ` Mike Rapoport
2026-09-01 12:59 ` [PATCH 2/2] mm: remove unused totalram_pages_inc() and totalram_pages_dec() Tal Zussman
2026-09-01 14:06 ` Lorenzo Stoakes (ARM)
2026-09-01 14:29 ` Tal Zussman
2026-09-01 14:42 ` Lorenzo Stoakes (ARM)
2026-09-01 16:14 ` Mike Rapoport
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox