From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id DEB25C19F2C for ; Wed, 3 Aug 2022 08:15:36 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 330C16B0071; Wed, 3 Aug 2022 04:15:36 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2EC7F6B0072; Wed, 3 Aug 2022 04:15:36 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1A9018E0001; Wed, 3 Aug 2022 04:15:36 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 0BDFD6B0071 for ; Wed, 3 Aug 2022 04:15:36 -0400 (EDT) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id B00821A06C4 for ; Wed, 3 Aug 2022 08:15:35 +0000 (UTC) X-FDA: 79757572230.07.31E7341 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf22.hostedemail.com (Postfix) with ESMTP id 30585C00ED for ; Wed, 3 Aug 2022 08:15:34 +0000 (UTC) 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 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1659514534; a=rsa-sha256; cv=none; b=l94oebNrHm4lHX6aULn7l1t8PLxrldcqbMu798A/BTz60MGrNxIAeB83fiIuQd+jqM7ChG 9jNAqSrA6yzo3qoG7Of0XnuceUaxtMUh47pVDTCfaoygW/9jzmMnMdQ5ivKj22q5KTx5/D aC4GWXew0rQIkECm6V1IQD4G8fbetyE= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=cWT3eTB9; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=DdGJA6e9; spf=pass (imf22.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.29 as permitted sender) smtp.mailfrom=vbabka@suse.cz; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1659514534; h=from:from:sender:reply-to:subject:subject: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:dkim-signature; bh=aluuMVa/fjoydrBodCTg8q62SCW5RTs+YXF3mxxkRS4=; b=AN9C7Pfm9TmoL+5Zc+xYsTkPvm9yFDUrgYAJXxxlmPvm2t/d52hGIwbW7iCqjqYquiF7fY ukmBQvbsy5jo8zAaAveKv0xliK8bdr/Xu4A9pqUq88wa5o2T+JgvU6qMP1QGsQ57Xm/kHe SUTmd8qwlBEPdEMLvyxH2cwz7RAPM3M= Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=cWT3eTB9; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=DdGJA6e9; spf=pass (imf22.hostedemail.com: domain of vbabka@suse.cz designates 195.135.220.29 as permitted sender) smtp.mailfrom=vbabka@suse.cz; dmarc=none X-Stat-Signature: ettsh7xkigipxt9xzsrkk7fdosi64qw6 X-Rspamd-Queue-Id: 30585C00ED X-Rspamd-Server: rspam09 X-Rspam-User: X-HE-Tag: 1659514534-258794 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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; > > /*