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]
Date:   Wed, 3 Aug 2022 10:15:31 +0200
From:   Vlastimil Babka <vbabka@...e.cz>
To:     Abel Wu <wuyun.abel@...edance.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Michal Hocko <mhocko@...nel.org>,
        Mel Gorman <mgorman@...hsingularity.net>,
        Muchun Song <songmuchun@...edance.com>
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/page_alloc: only search higher order when fallback

On 8/3/22 04:51, Abel Wu wrote:
> It seems unnecessary to search pages with order < alloc_order in
> fallback allocation.

This can currently happen with ALLOC_NOFRAGMENT and alloc_order >
pageblock_order, so add a test to prevent it.

> Signed-off-by: Abel Wu <wuyun.abel@...edance.com>

Acked-by: Vlastimil Babka <vbabka@...e.cz>

> ---
>  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 e008a3df0485..0abafc2fc3e0 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -2934,7 +2934,7 @@ __rmqueue_fallback(struct zone *zone, int order, int start_migratetype,
>  	 * i.e. orders < pageblock_order. If there are no local zones free,
>  	 * the zonelists will be reiterated without ALLOC_NOFRAGMENT.
>  	 */
> -	if (alloc_flags & ALLOC_NOFRAGMENT)
> +	if (order < pageblock_order && alloc_flags & ALLOC_NOFRAGMENT)
>  		min_order = pageblock_order;
>  
>  	/*

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ