Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp745249rdb; Thu, 15 Feb 2024 14:18:21 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV42E6+rj5485gz+oT1rIzmSmlsI5SzhQA7TaXEg0u0lJLdf+3fADUH6efXrCuZEYyFHWR57PawbtBnCPfJBOUPsAqmkzUNzP4BfcRPog== X-Google-Smtp-Source: AGHT+IGbLPFgqPFWAodMgHbiwOweUgvaFMaVZXKRcq2Dblwg9PEcAuTmZ03bKd9ry8zo+x3sltkR X-Received: by 2002:adf:e590:0:b0:33b:6099:5951 with SMTP id l16-20020adfe590000000b0033b60995951mr2663813wrm.7.1708035501079; Thu, 15 Feb 2024 14:18:21 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708035501; cv=pass; d=google.com; s=arc-20160816; b=YigA3jIFFV0FYssy0j0QnALzZVTboPRksF2qTHPcv++R/dpsFT/1ce8VZm3pAE88cH Gss5KLxCmQqlBEg/SpdCeWE5hjL4Ny8jEnbvaGu+3v3U7Qsi/8fDEDa2GQo34mO7faV0 bf85oz+2K32je9rt5sCoz9LaNstB8P4JCnf6XK5HpcZKWjNMYflXL68D1ZYc+4DRzoRs 4up0K6R/0jM6+lf8CdnNn59HPBscQwSaXrC7ueVkHDisEEL4rmZ6ynOLB7rjaU3+126Z aAqlVvVqH2zYiOVLQR1KWpvmP1JZ9q97WtHN6s60RjOPoxJUmWLR1NpbD2aNfjtMbljn Ncww== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=DLHIWZhrv84d6KmPP8BZW5HG3tmTNG2nCmARo35gkoM=; fh=2kzQHftTGsVixOf+x87JEOkMWlN1iKR18pMBUv6PHIA=; b=ZZXFn50DHwJ2hvyAcmdCmMXdpsonvy2+hbhjwDzWeNwLwaB1Hh/Z8LUe28SqUW5PUJ s9gs6djHtuS8HPnpw7t8fn+X8+gAbTlO7cdKT0W9EC6s3ukbVyBrxx3TmE702NFdNDeT Uqkj88/TZh5PLE30Cu4F83FS2usyS7xL5U+izh2WH2w9FFtcMo8q+PwxV4CPgDSfR3Df GKT8BaO/Nn3Eg9CXFu9mODHQfLf6tvf2oDEjapYtXuDo12RPHA+uPqke8zjIurPFiHIo lP/2myXqPyHLJMLxglQ01HsEcR0+AzzJWRpIzOEidyDH2/2u/WgKXfwmC51ZIdwA7soW GnxQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=z5wTSasA; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-67769-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67769-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id bd4-20020a056402206400b00563dc851cbbsi257600edb.90.2024.02.15.14.18.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 14:18:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-67769-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=z5wTSasA; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-67769-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67769-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id CC94D1F29310 for ; Thu, 15 Feb 2024 22:18:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5B2CC146007; Thu, 15 Feb 2024 22:10:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="z5wTSasA" Received: from mail-yw1-f170.google.com (mail-yw1-f170.google.com [209.85.128.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 113F0145B07 for ; Thu, 15 Feb 2024 22:10:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708035025; cv=none; b=iCSv3wvBSnZSqeaJNltg2VQanaOCsqDlntIS/14RpHiq97P+DKb+NWLUsqGj6jCo77wxRQhqilwSEpigm4TrGA/ul6S2QQyiuTSnGTurctB8DnLA2lK4sF52QHHsjjbsrkPRpHehJL3O43sdEg6j1rkZZ9jPsIGwrQ3vfOzeXmk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708035025; c=relaxed/simple; bh=yyAnxZLHxtUIlmQo1r4GlPP4knPmSLoBXYbWMNr6yNA=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=hRivhIIWcTU+f2QBcclhmWzeQj7POVlIE8oIDUaTuxS+7tPd6IXHbv0721aHhnGi+6DW/4BH9KWDTn0hptMEpwE2Hcz6A+apc5bhcdywrJrCNAiL+LB1MNMWGmO+AOEnnUq2D0HSVj9zk02S/V9beMM4WO1WlEpxM/Q4fdqguTQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=z5wTSasA; arc=none smtp.client-ip=209.85.128.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-yw1-f170.google.com with SMTP id 00721157ae682-607d590aeb5so10042577b3.0 for ; Thu, 15 Feb 2024 14:10:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1708035022; x=1708639822; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=DLHIWZhrv84d6KmPP8BZW5HG3tmTNG2nCmARo35gkoM=; b=z5wTSasAintVb0xk9c/XL4+gc9g7V6vjS46FpEg3svDbR0wvkFu+frPuzmnvIbnuyn zPDt6aPTkFLl54eHnlrY/EENJ0P7d0jenhQg1RYEeNEuNfW2Dppivd1tdTK+wRFMsKSZ rLvtTc5ysaSpq8r8+O0Y+lIj5Bs4Ro3GIJ+6F9uiAR29Ll3ktHhUtwifaBBkuk8bHE5F b1Lpmw1kiYTW/Z7dtGK0tcsV71lI6FJL7iN6n21M6bX7CUw5TLVhT9Q+oOM4MXwdaD6P rHrqEWYELbgs//LtblzNVxGlsbE6U88eTBLXcFMq/5kBzWC1MBWS3qYsefyjgJIEbpHZ EclQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708035022; x=1708639822; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DLHIWZhrv84d6KmPP8BZW5HG3tmTNG2nCmARo35gkoM=; b=POALe0yYflhLttRyf6nn+PQG6X4SxvRw7uD4PGFQXk4blAXUWQu+NBdJH0yHvGzKhH g/EM8COoa/belpINpZ8hFEGmXy6Aaj68Xtx5YxY+Vch/atu3d5fGBKvaob+ZHlv22wYa N/Cg2hsJGK1WQgdChDWalh/FEFfmm3GmzYcKhO4FFvA6rM5ROuoo94af0hMusohAn7v7 PNqLCqwGAUdBQC+Wrl8zdhHidYX6AkP1otTWLXGTxavzQO50wO+WZB+Fdc+rpyxtlAYP lK1X8M2hhP4x2qaHVr+7tZxqpAPOC/8wHyM+WRDKiZR9TfnV3RHKaA4fPUzCOVqnIOBC bpGQ== X-Forwarded-Encrypted: i=1; AJvYcCXoMjBY7t7tEvHfpTfl6J0242hCtMhoS4xUA5fQqpJJIHRUdoj1I+NrnerfDT5sMjO1KqE9LOG5W4WBvOjn/n7VSg7jO5O7Lm05N7Rf X-Gm-Message-State: AOJu0YwXS1MNfdbUgqs1BsE/mP/Nki519F6YA08qiazqujyf3kblJyQG mmu318pkJV3TDOdiDvG3Xa8tCTPm6PdpsvZQshsxVNrJkAWtZNCqlP3OA3NKG4WAvh5weLKjH5X a2EOvFxx/f+uXBXA6mPY56By8ioAjRDv7jOPZ X-Received: by 2002:a0d:cc81:0:b0:5ff:956a:1a05 with SMTP id o123-20020a0dcc81000000b005ff956a1a05mr3845012ywd.14.1708035021851; Thu, 15 Feb 2024 14:10:21 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240212213922.783301-1-surenb@google.com> <20240212213922.783301-8-surenb@google.com> In-Reply-To: From: Suren Baghdasaryan Date: Thu, 15 Feb 2024 14:10:09 -0800 Message-ID: Subject: Re: [PATCH v3 07/35] mm/slab: introduce SLAB_NO_OBJ_EXT to avoid obj_ext creation To: Vlastimil Babka Cc: Kent Overstreet , 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Feb 15, 2024 at 1:50=E2=80=AFPM Vlastimil Babka wr= ote: > > On 2/15/24 22:37, Kent Overstreet wrote: > > 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 c= reated > >> > 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 thes= e > >> > 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 /* Object= s 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? Indeed. I somehow missed it. Thanks for noticing, will fix this in the next version. > > > > What's up with the order of flags in that file? They don't seem to > > follow any particular ordering. > > Seems mostly in increasing order, except commit 4fd0b46e89879 broke it fo= r > SLAB_RECLAIM_ACCOUNT? > > > Seems like some cleanup is in order, but any history/context we should > > know first? > > Yeah noted, but no need to sidetrack you.