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=unavailable 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 C5013C47084 for ; Tue, 25 May 2021 12:10:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A35B561421 for ; Tue, 25 May 2021 12:10:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232233AbhEYML3 (ORCPT ); Tue, 25 May 2021 08:11:29 -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