Re: [PATCH v4 07/18] mm: move some stuff to mm/page_alloc.h

From: Brendan Jackman

Date: Fri Jul 03 2026 - 05:30:17 EST


On Thu Jul 2, 2026 at 10:28 AM UTC, sashiko-bot wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Low] Duplicate declaration of `drain_local_pages()` in `mm/page_alloc.h` contradicts the commit message.
> --
>
> commit 54f4dc2300a55c6c9cef3e3916ba57e09ad07e39
> Author: Brendan Jackman <jackmanb@xxxxxxxxxx>
>
> mm: move some stuff to mm/page_alloc.h
>
> This commit shrinks the scope of several internal functions by moving their
> declarations from the public include/linux/gfp.h header to the internal
> mm/page_alloc.h header.
>
>> diff --git a/mm/page_alloc.h b/mm/page_alloc.h
>> index a4f4b325381ad..6bb50bae3ba27 100644
>> --- a/mm/page_alloc.h
>> +++ b/mm/page_alloc.h
>
> [ ... ]
>
>> @@ -266,6 +266,34 @@ static inline bool free_area_empty(struct free_area *area, int migratetype)
>> return list_empty(&area->free_list[migratetype]);
>> }
>>
>> +/* Convert GFP flags to their corresponding migrate type */
>> +#define GFP_MOVABLE_MASK (__GFP_RECLAIMABLE|__GFP_MOVABLE)
>
> [ ... ]
>
>> +bool decay_pcp_high(struct zone *zone, struct per_cpu_pages *pcp);
>> +void drain_zone_pages(struct zone *zone, struct per_cpu_pages *pcp);
>> +void drain_all_pages(struct zone *zone);
>> +void drain_local_pages(struct zone *zone);
>
> [Severity: Low]
> The commit message notes that drain_local_pages() is still used externally
> and needs to stay behind in include/linux/gfp.h. Since it was successfully
> left in the public header, is this declaration in mm/page_alloc.h an
> accidental duplicate?

Ugh, yep. My local Sashiko run found this but apparently I failed to
actually fix it...? Doing thigs is so hard.