Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp239400imn; Wed, 3 Aug 2022 01:41:59 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tfS5ys40ESI0PgUQrIlXaF7s2SYVg3nlwkaB1JtQsvO45dvkOD9Pev08yBHZjRLHK3sh2O X-Received: by 2002:a05:6402:430e:b0:43d:1cf6:61ec with SMTP id m14-20020a056402430e00b0043d1cf661ecmr23634235edc.194.1659516118688; Wed, 03 Aug 2022 01:41:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659516118; cv=none; d=google.com; s=arc-20160816; b=cBzWOsFaAnYTGLjzw/sYDPIOYW0lOQf6S5AtvETnYNFgLEkmHJmKhpia4gAzNx2l03 4rqMOJqAtwWax10KNNGiN5FSU8Fh39h6LRHFrNjvHeImD1JV9IBRA4aacpYLKtHFBpVS maCoQ62atUIsKRj8VyTBV5F1/9h9pV3/TF2sjxToML2qurh0XIFa7M1JkYlev043Zg5W FWqf1lr/xnpFl5dt0cqyIGLnE1RABeNC8A5hVD4TYAVJ5xXWA2f93laPeyCO3bn6JW6H V4NcDVxDxTSvT8qhl1S/Gy7kr9WAH1d9X2hsDRWYJ2g4Mknn4wLJyIizyNUgcDBxDK5W SK+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature:dkim-signature; bh=aluuMVa/fjoydrBodCTg8q62SCW5RTs+YXF3mxxkRS4=; b=ntztgKAih9HcLuonwkzhEPqbvQVNEWVRQg2DAdXDqzCgJxGxrGTXoLfctOPRPcfWhH AeQxQZ4EZMxY4YXUn9A+bNbex+7fhczsRg7iO9armBuuO9V5uDB2wNEZRaFlfCnP4OTi lqhhNpIsQQKWLAEqGgkXVGzn4Ow1vjiTw51M6Yv5/KvXCO8Hi00H5t8aabnxgF4KBpe6 pbDgU6aL4JGrzvSAW+e3+T4MPZWw8I5sAgPFq5UM9FJf+KdIAluERUkNGpz29V8bMcIk 4zo+qYdceNOHP0gmXXVqh1WVGp71u5U14J++PzxgzgkUtz9d3OaJGYl0/7FHYCKAKBLx 3QrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=cWT3eTB9; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=DdGJA6e9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cw17-20020a170906479100b007309da3d6e1si2878149ejc.434.2022.08.03.01.41.34; Wed, 03 Aug 2022 01:41:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=cWT3eTB9; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=DdGJA6e9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232447AbiHCIPh (ORCPT + 99 others); Wed, 3 Aug 2022 04:15:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229944AbiHCIPf (ORCPT ); Wed, 3 Aug 2022 04:15:35 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0BFE60D0 for ; Wed, 3 Aug 2022 01:15:33 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 558AD1FED9; Wed, 3 Aug 2022 08:15:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1659514532; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aluuMVa/fjoydrBodCTg8q62SCW5RTs+YXF3mxxkRS4=; b=cWT3eTB9Y9vn1CONW64FqYinNeGYVTE3BryGQqVng0wVg7LOBtK03YpuqkkN8HZAw/3667 jprj3Ljl8tKOupGlPzHVrMY0LMnWiwfMCLoFPf309N/9TC6ToIFULSiejDj/eniZLu7KuF 7lcrYa47rNBVzvonJ52a00iF2b+4Ruk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1659514532; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aluuMVa/fjoydrBodCTg8q62SCW5RTs+YXF3mxxkRS4=; b=DdGJA6e9cbQxNXTW+KT0sh0zqj4KZeC6CM9LshXwnB8bWDN6FDxhZx/sbp0Vd39gLm4awp 1lF/UJPTnbyY0pAw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 373D813AD8; Wed, 3 Aug 2022 08:15:32 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id yvjIDKQu6mIYYwAAMHmgww (envelope-from ); Wed, 03 Aug 2022 08:15:32 +0000 Message-ID: <6ac42cd6-9f93-e80c-0bd3-d0c9439cf327@suse.cz> Date: Wed, 3 Aug 2022 10:15:31 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH] mm/page_alloc: only search higher order when fallback Content-Language: en-US To: Abel Wu , Andrew Morton , Michal Hocko , Mel Gorman , Muchun Song Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20220803025121.47018-1-wuyun.abel@bytedance.com> From: Vlastimil Babka In-Reply-To: <20220803025121.47018-1-wuyun.abel@bytedance.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Acked-by: Vlastimil Babka > --- > 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; > > /*