Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mm/page_alloc: harmonize should_compact_retry() type

Currently order is signed in one version of the function and unsigned in
the other. Tidy that up.

In page_alloc.c, order is unsigned in the vast majority of cases. But,
there is a cluster of exceptions in compaction-related code (probably
stemming from the fact that compact_control.order is signed). So, prefer
local consistency and make this one signed too.

Link: https://lkml.kernel.org/r/20250826-cleanup-should_compact_retry-v1-1-d2ca89727fcf@google.com
Signed-off-by: Brendan Jackman <jackmanb@google.com>
Reviewed-by: Zi Yan <ziy@nvidia.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Brendan Jackman and committed by
Andrew Morton
6c382617 ef49b7b3

+1 -1
+1 -1
mm/page_alloc.c
··· 4182 4182 } 4183 4183 4184 4184 static inline bool 4185 - should_compact_retry(struct alloc_context *ac, unsigned int order, int alloc_flags, 4185 + should_compact_retry(struct alloc_context *ac, int order, int alloc_flags, 4186 4186 enum compact_result compact_result, 4187 4187 enum compact_priority *compact_priority, 4188 4188 int *compaction_retries)