lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <39EB2EAF-64BD-49C4-80B1-4424CD723C5E@nvidia.com>
Date: Tue, 26 Aug 2025 17:15:00 -0400
From: Zi Yan <ziy@...dia.com>
To: Brendan Jackman <jackmanb@...gle.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
 Vlastimil Babka <vbabka@...e.cz>, Suren Baghdasaryan <surenb@...gle.com>,
 Michal Hocko <mhocko@...e.com>, Johannes Weiner <hannes@...xchg.org>,
 linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/page_alloc: Harmonize should_compact_retry() type

On 26 Aug 2025, at 10:06, Brendan Jackman wrote:

> 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.
>
> Signed-off-by: Brendan Jackman <jackmanb@...gle.com>
> ---
>  mm/page_alloc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index d1d037f97c5fc76f8a7739e8515d7593e0ad44f9..8faa0ad9f461fbe151ec347e331d83c2fdc8cad2 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -4182,7 +4182,7 @@ __alloc_pages_direct_compact(gfp_t gfp_mask, unsigned int order,
>  }
>
>  static inline bool
> -should_compact_retry(struct alloc_context *ac, unsigned int order, int alloc_flags,
> +should_compact_retry(struct alloc_context *ac, int order, int alloc_flags,
>  		     enum compact_result compact_result,
>  		     enum compact_priority *compact_priority,
>  		     int *compaction_retries)
>
> ---
> base-commit: fab1beda7597fac1cecc01707d55eadb6bbe773c
> change-id: 20250826-cleanup-should_compact_retry-9c6b5cdf8d27
>

LGTM. Reviewed-by: Zi Yan <ziy@...dia.com>

--
Best Regards,
Yan, Zi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ