Re: [PATCH v3 2/4] cgroup/cpuset: update some comments about the page allocator
Waiman Long <[email protected]>
| Newsgroups | dev.linux.lists.linux-rt-devel,org.kernel.vger.cgroups,org.kernel.vger.linux-kernel,org.kvack.linux-mm |
|---|---|
| Message-ID | <[email protected]> |
On 7/15/26 7:03 AM, Brendan Jackman wrote: > These comments describing the page allocator are out of date: > > - __alloc_pages() is no longer a public API and has no business being > described outside of mm/. > > - The `wait` variable is gone. > > It may be out of date for other reasons too but this patch is just > fixing the issues that stood out. > > To fix it: > > - Instead of referring to a specific function, instead to "the page > allocator" > > - Completely drop out-of-date details of that function's internal > behaviour, since they were irrelevant anyway. > > Suggested-by: Zi Yan <[email protected]> > Link: https://lore.kernel.org/all/[email protected]/ > Reviewed-by: Zi Yan <[email protected]> > Signed-off-by: Brendan Jackman <[email protected]> > --- > kernel/cgroup/cpuset.c | 13 +++++-------- > 1 file changed, 5 insertions(+), 8 deletions(-) > > diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c > index 24ea2d09cdbdb..dfd0f827e3b92 100644 > --- a/kernel/cgroup/cpuset.c > +++ b/kernel/cgroup/cpuset.c > @@ -4193,7 +4193,7 @@ static struct cpuset *nearest_hardwall_ancestor(struct cpuset *cs) > * nearest enclosing hardwalled ancestor cpuset. > * > * Scanning up parent cpusets requires callback_lock. The > - * __alloc_pages() routine only calls here with __GFP_HARDWALL bit > + * page allocator only calls here with __GFP_HARDWALL bit > * _not_ set if it's a GFP_KERNEL allocation, and all nodes in the > * current tasks mems_allowed came up empty on the first pass over > * the zonelist. So only GFP_KERNEL allocations, if all nodes in the > @@ -4206,11 +4206,8 @@ static struct cpuset *nearest_hardwall_ancestor(struct cpuset *cs) > * come before the __GFP_HARDWALL check, otherwise a dying task > * would be blocked on the fast path. > * > - * The second pass through get_page_from_freelist() doesn't even call > - * here for GFP_ATOMIC calls. For those calls, the __alloc_pages() > - * variable 'wait' is not set, and the bit ALLOC_CPUSET is not set > - * in alloc_flags. That logic and the checks below have the combined > - * affect that: > + * The second pass through get_page_from_freelist() doesn't even call here for > + * GFP_ATOMIC calls. That, and the checks below have the combined affect that: > * in_interrupt - any node ok (current task context irrelevant) > * GFP_ATOMIC - any node ok > * tsk_is_oom_victim - any node ok > @@ -4327,8 +4324,8 @@ void cpuset_nodes_allowed(struct cgroup *cgroup, nodemask_t *mask) > * should not be possible for the following code to return an > * offline node. But if it did, that would be ok, as this routine > * is not returning the node where the allocation must be, only > - * the node where the search should start. The zonelist passed to > - * __alloc_pages() will include all nodes. If the slab allocator > + * the node where the search should start. The zonelist used by > + * the allocator will include all nodes. If the slab allocator > * is passed an offline node, it will fall back to the local node. > * See kmem_cache_alloc_node(). > */ Acked-by: Waiman Long <[email protected]>