Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4305157pxj; Tue, 25 May 2021 05:11:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyIk5ssM+UqVHENQDVXJpG7WqcF9PVixR8fCpy2Lbh3A9qvxkSVvv05CD3RsrI6ujQNZKd+ X-Received: by 2002:a92:cda4:: with SMTP id g4mr20941106ild.47.1621944689890; Tue, 25 May 2021 05:11:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621944689; cv=none; d=google.com; s=arc-20160816; b=cfZvdz35K0YTc6xq0e0Jnlqqb3/QIqxDA/EvsD5ZUQmrCi8vKI7UolkXzNYGhwQ7QZ PvEC7ELWSeJYSrjIq2KLc/mhHbL3DOeHyrSBJc4ebgsqfEOAMFZFFfJmYUFkquYw4iqP xHj4SweYyXbuGommvAocBLy9md/UgVvhVt/oflkbXfqlX8puTjsV6EsxCelDjOti5kpg Ubwba+IZI4vTyN7FKU4WQY0jLVlPJeqPD0cHRwgXiY06RIBmFfYhfsvwJydq0AGVaAMR d1w2+2Lk4G1VDRym4OakVGNphDY6TSKOwAjI7lD5SGyJP/i2VmxtK8OsBOa+nL8nqJ4E t+dQ== 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=X6nMV1LSmMfz7MHjh2y9ZwY6085XiWnIFHbBf0WQGPA=; b=VTzc1szSKGcnDLMYsOWZr+CkavCr9YCvZ18pKkfjyN+E/aAO6DGkqMta6YhZCczucr L5QJMgb+ZzrzR3RvFDNHgW3QX8pBF+uMk4X4EaxqmhFf2pOG3UMOHbgnRvbGc/iHjK1S 8OKEeFzKH0McXL+l03WD8mgv8vP4XhJY4c8pf1ztrVu39ab7UefI2Pykr3Kftc4d+r/6 53tZyNtPRsCf3qwGeV15tJ/qZtQuCFLekUkYsa5YqMFfUAoHwBbC/Tod0W0y0nn284C3 XOBNWVpRM33uC1PHUOnmyvTRy1XaNhPWOm3ik7h96eyKSvA9zS7Zbj6Z+rlgbDvaoWs1 KQvw== 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 j10si16295306ilk.31.2021.05.25.05.11.07; Tue, 25 May 2021 05:11:29 -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 S232153AbhEYML2 (ORCPT + 99 others); Tue, 25 May 2021 08:11:28 -0400 Received: from outbound-smtp27.blacknight.com ([81.17.249.195]:48320 "EHLO outbound-smtp27.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231897AbhEYML1 (ORCPT ); Tue, 25 May 2021 08:11:27 -0400 Received: from mail.blacknight.com (pemlinmail05.blacknight.ie [81.17.254.26]) by outbound-smtp27.blacknight.com (Postfix) with ESMTPS id 401E0CACC0 for ; Tue, 25 May 2021 13:09:57 +0100 (IST) Received: (qmail 19293 invoked from network); 25 May 2021 12:09:57 -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 12:09:56 -0000 Date: Tue, 25 May 2021 13:09:54 +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 08/26] mm, slub: restructure new page checks in ___slab_alloc() Message-ID: <20210525120954.GQ30378@techsingularity.net> References: <20210524233946.20352-1-vbabka@suse.cz> <20210524233946.20352-9-vbabka@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20210524233946.20352-9-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:28AM +0200, Vlastimil Babka wrote: > When we allocate slab object from a newly acquired page (from node's partial > list or page allocator), we usually also retain the page as a new percpu slab. > There are two exceptions - when pfmemalloc status of the page doesn't match our > gfp flags, or when the cache has debugging enabled. > > The current code for these decisions is not easy to follow, so restructure it > and add comments. No functional change. > > Signed-off-by: Vlastimil Babka > > > > + if (unlikely(!pfmemalloc_match(page, gfpflags))) > + /* > + * For !pfmemalloc_match() case we don't load freelist so that > + * we don't make further mismatched allocations easier. > + */ > + goto return_single; > + > + goto load_freelist; > + > +return_single: > This looked odd to me but I see other stuff goes between the two goto's later in the series so Acked-by: Mel Gorman -- Mel Gorman SUSE Labs