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 X-Spam-Level: X-Spam-Status: No, score=-10.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 172AEC2B9F8 for ; Tue, 25 May 2021 12:10:01 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9A94C61402 for ; Tue, 25 May 2021 12:10:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9A94C61402 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=techsingularity.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 17E226B006C; Tue, 25 May 2021 08:10:00 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1569E6B006E; Tue, 25 May 2021 08:10:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 01D306B0070; Tue, 25 May 2021 08:09:59 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0041.hostedemail.com [216.40.44.41]) by kanga.kvack.org (Postfix) with ESMTP id C4E096B006C for ; Tue, 25 May 2021 08:09:59 -0400 (EDT) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 5B46A8154 for ; Tue, 25 May 2021 12:09:59 +0000 (UTC) X-FDA: 78179634918.07.22B2314 Received: from outbound-smtp14.blacknight.com (outbound-smtp14.blacknight.com [46.22.139.231]) by imf08.hostedemail.com (Postfix) with ESMTP id E85758019127 for ; Tue, 25 May 2021 12:09:52 +0000 (UTC) Received: from mail.blacknight.com (pemlinmail05.blacknight.ie [81.17.254.26]) by outbound-smtp14.blacknight.com (Postfix) with ESMTPS id 4AF2A1C3D94 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) Authentication-Results: imf08.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf08.hostedemail.com: domain of mgorman@techsingularity.net designates 46.22.139.231 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net X-Stat-Signature: 7ehoqudz3w48p4814zcy8exk9f33fp55 X-Rspamd-Queue-Id: E85758019127 X-Rspamd-Server: rspam02 X-HE-Tag: 1621944592-396931 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 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