Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4452451pxj; Tue, 25 May 2021 08:18:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxlUXtyezfS/FsSTpsxoMyO81zvaX2wEXISc5LHNGVmXQ7tua/bxgHaxjY8QX4zPDg4s1Fp X-Received: by 2002:a17:906:d14b:: with SMTP id br11mr29663881ejb.490.1621955937545; Tue, 25 May 2021 08:18:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621955937; cv=none; d=google.com; s=arc-20160816; b=CuB6/bcyfGDbz0K9I/+z9FunbD4DjtvIKDpFSM6D8fjalL4X8ckQwHIPQ/MRkzIB13 6tW3lOwaR4Oo+SDSJGAV96P5xXnoTohbzmWtEESQblrHmIBLoYp0YRL3tcfDwa3ClMkw prISC/K7BwKJvCufvUI7KwiVhuS4sCwfSHnlSIykvmkJvriaTmuXZuiIZU1VX+K96jqf wSH8J8VxGrIezH5yS2wi+t38xUEwafAkZ45MT23GmNyMtA0R8Og+auOE64XNni9WMj6D qR4xH3tCONlf3z4PVSlG41fEeZKqtw18bovfr1toav5VF1pCg8E//8Qo4hkitCha1Ptf si7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=H3nAFJm53RGvKO4I/oyEcyjzK/onUExegivfcbxQklg=; b=NbUsnzWpnRpRV06w5ibk3GM4wa+VuEdutaKOpywrp1wtSsQAQ93RWukAMDoJ7iXnoL t68u4/IndE8KQ6DA1ZntVHUeJ1voP69UM+oCS3PMerc/g6U+ziheYcBerbV8+Nz4Kp5D yAeJVT/hxci32OnsRb1/Cye6JNSxg+pokqzbLiLC+4dtvuSVp6I1SNv3v1R3zlGRwtF6 NqDZvrG8/pJ5U2AEW9DZkUlL9n8O5zgPTMS3yCWEFGfbMxgovtsiLaW4mq4JLA8iGOQO 3u+Zr7TkSP6OKIC7eom7GCdZKpE0YD5FJ0ij//RmJf1y1qtdBBJrlKN2peBRlzkhZu2i Nung== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j1si16662921eds.552.2021.05.25.08.18.34; Tue, 25 May 2021 08:18:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232078AbhEYL4Z (ORCPT + 99 others); Tue, 25 May 2021 07:56:25 -0400 Received: from outbound-smtp57.blacknight.com ([46.22.136.241]:42627 "EHLO outbound-smtp57.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231770AbhEYL4Y (ORCPT ); Tue, 25 May 2021 07:56:24 -0400 Received: from mail.blacknight.com (pemlinmail06.blacknight.ie [81.17.255.152]) by outbound-smtp57.blacknight.com (Postfix) with ESMTPS id E8318FAC00 for ; Tue, 25 May 2021 12:54:53 +0100 (IST) Received: (qmail 30068 invoked from network); 25 May 2021 11:54:53 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.23.168]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 25 May 2021 11:54:53 -0000 Date: Tue, 25 May 2021 12:54:51 +0100 From: Mel Gorman To: Vlastimil Babka Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Christoph Lameter , David Rientjes , Pekka Enberg , Joonsoo Kim , Sebastian Andrzej Siewior , Thomas Gleixner , Jesper Dangaard Brouer , Peter Zijlstra , Jann Horn Subject: Re: [RFC 05/26] mm, slub: extract get_partial() from new_slab_objects() Message-ID: <20210525115451.GO30378@techsingularity.net> References: <20210524233946.20352-1-vbabka@suse.cz> <20210524233946.20352-6-vbabka@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20210524233946.20352-6-vbabka@suse.cz> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 25, 2021 at 01:39:25AM +0200, Vlastimil Babka wrote: > The later patches will need more fine grained control over individual actions > in ___slab_alloc(), the only caller of new_slab_objects(), so this is a first > preparatory step with no functional change. > > Signed-off-by: Vlastimil Babka > > @@ -2748,6 +2743,10 @@ static void *___slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node, > goto redo; > } > > + freelist = get_partial(s, gfpflags, node, c); > + if (freelist) > + goto check_new_page; > + > freelist = new_slab_objects(s, gfpflags, node, &c); > > if (unlikely(!freelist)) { It's a nit-pick, but why did you not simply do something like this instead of the goto? freelist = get_partial(s, gfpflags, node, c); if (!freelist) freelist = new_slab_objects(s, gfpflags, node, &c); if (unlikely(!freelist)) ... If nothing else, the label may be misleading because c->page may not be new. -- Mel Gorman SUSE Labs