Re: [PATCH v5 14/18] mm: Move __alloc_pages() to mm/page_alloc.h
From: Zi Yan
Date: Fri Jul 03 2026 - 11:05:53 EST
On Fri Jul 3, 2026 at 8:31 AM EDT, Brendan Jackman wrote:
> It's no longer used outside of mm/.
>
> Since this means __alloc_pages_noprof() is no longer visible from gfp.h,
> this also means moving the definition of alloc_pages_node_noprof into
> the .c file.
>
> Also remove references to this API from the documentation tree -
> referring to the specific function name was already questionable but
> now the function is not even public it definitely seems wrong.
>
> Reviewed-by: Vlastimil Babka (SUSE) <vbabka@xxxxxxxxxx>
> Signed-off-by: Brendan Jackman <jackmanb@xxxxxxxxxx>
> ---
> Documentation/admin-guide/cgroup-v1/cpusets.rst | 2 +-
> Documentation/admin-guide/mm/transhuge.rst | 2 +-
> include/linux/gfp.h | 16 +---------------
> mm/page_alloc.c | 13 ++++++++++++-
> mm/page_alloc.h | 4 ++++
> 5 files changed, 19 insertions(+), 18 deletions(-)
>
> diff --git a/Documentation/admin-guide/cgroup-v1/cpusets.rst b/Documentation/admin-guide/cgroup-v1/cpusets.rst
> index c7909e5ac1361..52a213aff04e5 100644
> --- a/Documentation/admin-guide/cgroup-v1/cpusets.rst
> +++ b/Documentation/admin-guide/cgroup-v1/cpusets.rst
> @@ -284,7 +284,7 @@ take action.
> ==>
> Unless this feature is enabled by writing "1" to the special file
> /dev/cpuset/memory_pressure_enabled, the hook in the rebalance
> - code of __alloc_pages() for this metric reduces to simply noticing
> + code of the page allocator for this metric reduces to simply noticing
> that the cpuset_memory_pressure_enabled flag is zero. So only
> systems that enable this feature will compute the metric.
>
kernel/cgroup/cpuset.c still has 3 references to __alloc_pages(). They
can be converted as well. Otherwise,
Reviewed-by: Zi Yan <ziy@xxxxxxxxxx>
--
Best Regards,
Yan, Zi