Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp727185rdb; Thu, 15 Feb 2024 13:37:43 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU0tAbXEJexwoCC3eB8e07wnmWwIaiX5euoHE9tFtYn/LsqUhCwiePrf1e5lsoo56B3kax0AXiVVpyi1356UXupqN7xnQVHWESZ8oeIbA== X-Google-Smtp-Source: AGHT+IH6WB46HWiQtX0SzBkKDd3YkJglq+dCkyg40QXcmYJToF4lsGZwIhJeATDy4ed2jlvosFyE X-Received: by 2002:a05:6358:2913:b0:177:afce:b12 with SMTP id y19-20020a056358291300b00177afce0b12mr2729718rwb.31.1708033063387; Thu, 15 Feb 2024 13:37:43 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708033063; cv=pass; d=google.com; s=arc-20160816; b=agTVQaS9L1CI3mMSHcMOTnKAoDT9MxyE+H6dw+YcwvGCCik72PwAaBqqe6P+a2Qw1L VQk/9VzziFtaEFAd84gsoHYgtCQ2Ihw9rOPfIzmIVZTi5ApMfJ/JnvN3NPSsif2WQ0wJ +3XhKEAbnA1TYWCLBGuLy6EI2xiWN8184N9M1I0h7Xe4BnAT6kmGk4xcynpwx8lHzcoV gUvz5C29MQe1MaOJxDjmqQlzTS5650laaT2UGMOoiZWEoKBeq5C7XemrjxbGoZ4u8t/P R5Sz9o++cD9lmF126M6JFp6waGcsN7xFO2ESM7SlXsj5cUbwnYnNDHjZf99+TlEf2UGQ oEug== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:dkim-signature:date; bh=39zmCdbpcZTkNZlIqIoMaXRRJS4y9GsAOFJTtoi5f0I=; fh=oLzH21GokMW2l86dFsMPozOxCJDwxgKqQI1fOLLTHJM=; b=qV1STx5+jAEknn+NE/yIVs5ZRdJO6T9G2oBVnF+/wE3zdgpUHxHanGIH5oIneIPZiL 4ZqmmoLVluUY4s0AZCAJ7jvh9gKs8NP1eoCeXjMhY5KQTt9Yo+UTKt9mTyDv6abq0IVN 4Y4T/tzCEagrMgl9ZrhXkPj6dHZAp/qCI7O5aU7uYMoTEhKQjuHzzFwTTL5tx9XTmew6 g9X2DwedjXvPSKnk/b0Vj4OKVdx5faMTnWJ4rzmeKwN9oWW3v2O8yMkjXNp32oSyY6gt zymlvdBLtlh5Rl22KMZXqcPQIATeUFyQwDaBU8JrDXe4APka7V2Ljf8+K4+57ZWgLcPg JpQA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="Rnhwg+O/"; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-67702-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67702-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id dr8-20020a056a020fc800b005dc42fd8c40si1692703pgb.404.2024.02.15.13.37.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 13:37:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-67702-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="Rnhwg+O/"; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-67702-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67702-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 159E72861FD for ; Thu, 15 Feb 2024 21:37:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6456A13DBB3; Thu, 15 Feb 2024 21:37:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="Rnhwg+O/" Received: from out-179.mta1.migadu.com (out-179.mta1.migadu.com [95.215.58.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5620113A88C for ; Thu, 15 Feb 2024 21:37:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708033045; cv=none; b=s4hLizjUDro+QtOSWYImH1EYfS6wr22rcojRurmk+0fIPtkl9S65dMgVTd7F97MHblU0qPb09AhqnaRDmecEIeEynrw2VRNtO6IB61Msy5eZwho8oTOVyPYNZSG/q6aygacfYE8J8tSLWXgSFLIyZcX6Y2vuQUT3pSdZU5G2K/Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708033045; c=relaxed/simple; bh=6tomeDET5dYte8dARS9CJ7K826Uea8dsqGpQSkBapXU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=fj5sGf0eATjxYSBw5A5+zjgARrAVX2aJa0JxEqH/PXsRMgg7IPPzuq3rEq2cS53XjR2DBFDNNwipWgnR/7DPyjeyhR0VqGT5vlZoi2M3dfSpd9568ayoH0KMZmQAkHhftjf+P+mPlodLfy913i/gEWnB6v4Iak6KQHxMk3ygr74= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=Rnhwg+O/; arc=none smtp.client-ip=95.215.58.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Date: Thu, 15 Feb 2024 16:37:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1708033041; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=39zmCdbpcZTkNZlIqIoMaXRRJS4y9GsAOFJTtoi5f0I=; b=Rnhwg+O/fGg3InE7Iv5/dEuDz/AEL63LsTs3WOHzJhbI+Tp0Mqj1CPfI1GKmY5eOPSTVzM WeRBqw3S9FwgsAKOKdiLzXtsQQjE2MutvjEpVCTjrw7I3WMwInP/mysrsYUnh/9HHdE6gr C4/HCaIEa+ME+cB+PteBQP1XD+6Hwbg= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: Vlastimil Babka Cc: Suren Baghdasaryan , akpm@linux-foundation.org, mhocko@suse.com, hannes@cmpxchg.org, roman.gushchin@linux.dev, mgorman@suse.de, dave@stgolabs.net, willy@infradead.org, liam.howlett@oracle.com, corbet@lwn.net, void@manifault.com, peterz@infradead.org, juri.lelli@redhat.com, catalin.marinas@arm.com, will@kernel.org, arnd@arndb.de, tglx@linutronix.de, mingo@redhat.com, dave.hansen@linux.intel.com, x86@kernel.org, peterx@redhat.com, david@redhat.com, axboe@kernel.dk, mcgrof@kernel.org, masahiroy@kernel.org, nathan@kernel.org, dennis@kernel.org, tj@kernel.org, muchun.song@linux.dev, rppt@kernel.org, paulmck@kernel.org, pasha.tatashin@soleen.com, yosryahmed@google.com, yuzhao@google.com, dhowells@redhat.com, hughd@google.com, andreyknvl@gmail.com, keescook@chromium.org, ndesaulniers@google.com, vvvvvv@google.com, gregkh@linuxfoundation.org, ebiggers@google.com, ytcoode@gmail.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, bristot@redhat.com, vschneid@redhat.com, cl@linux.com, penberg@kernel.org, iamjoonsoo.kim@lge.com, 42.hyeyoo@gmail.com, glider@google.com, elver@google.com, dvyukov@google.com, shakeelb@google.com, songmuchun@bytedance.com, jbaron@akamai.com, rientjes@google.com, minchan@google.com, kaleshsingh@google.com, kernel-team@android.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux.dev, linux-arch@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-modules@vger.kernel.org, kasan-dev@googlegroups.com, cgroups@vger.kernel.org Subject: Re: [PATCH v3 07/35] mm/slab: introduce SLAB_NO_OBJ_EXT to avoid obj_ext creation Message-ID: References: <20240212213922.783301-1-surenb@google.com> <20240212213922.783301-8-surenb@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT On Thu, Feb 15, 2024 at 10:31:06PM +0100, Vlastimil Babka wrote: > On 2/12/24 22:38, Suren Baghdasaryan wrote: > > Slab extension objects can't be allocated before slab infrastructure is > > initialized. Some caches, like kmem_cache and kmem_cache_node, are created > > before slab infrastructure is initialized. Objects from these caches can't > > have extension objects. Introduce SLAB_NO_OBJ_EXT slab flag to mark these > > caches and avoid creating extensions for objects allocated from these > > slabs. > > > > Signed-off-by: Suren Baghdasaryan > > --- > > include/linux/slab.h | 7 +++++++ > > mm/slub.c | 5 +++-- > > 2 files changed, 10 insertions(+), 2 deletions(-) > > > > diff --git a/include/linux/slab.h b/include/linux/slab.h > > index b5f5ee8308d0..3ac2fc830f0f 100644 > > --- a/include/linux/slab.h > > +++ b/include/linux/slab.h > > @@ -164,6 +164,13 @@ > > #endif > > #define SLAB_TEMPORARY SLAB_RECLAIM_ACCOUNT /* Objects are short-lived */ > > > > +#ifdef CONFIG_SLAB_OBJ_EXT > > +/* Slab created using create_boot_cache */ > > +#define SLAB_NO_OBJ_EXT ((slab_flags_t __force)0x20000000U) > > There's > #define SLAB_SKIP_KFENCE ((slab_flags_t __force)0x20000000U) > already, so need some other one? What's up with the order of flags in that file? They don't seem to follow any particular ordering. Seems like some cleanup is in order, but any history/context we should know first?