Message ID | 20240306182440.2003814-9-surenb@google.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 92A4DC54E41 for <linux-mm@archiver.kernel.org>; Wed, 6 Mar 2024 18:25:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 422BD6B0096; Wed, 6 Mar 2024 13:25:05 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 383066B0098; Wed, 6 Mar 2024 13:25:05 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1616F6B0099; Wed, 6 Mar 2024 13:25:05 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 0238F6B0096 for <linux-mm@kvack.org>; Wed, 6 Mar 2024 13:25:04 -0500 (EST) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id CB87BA0191 for <linux-mm@kvack.org>; Wed, 6 Mar 2024 18:25:04 +0000 (UTC) X-FDA: 81867440928.01.80C94D6 Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) by imf29.hostedemail.com (Postfix) with ESMTP id 2EC00120010 for <linux-mm@kvack.org>; Wed, 6 Mar 2024 18:25:03 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=HXzRUPyn; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf29.hostedemail.com: domain of 3_rToZQYKCEEvxuhqejrrjoh.frpolqx0-ppnydfn.ruj@flex--surenb.bounces.google.com designates 209.85.219.202 as permitted sender) smtp.mailfrom=3_rToZQYKCEEvxuhqejrrjoh.frpolqx0-ppnydfn.ruj@flex--surenb.bounces.google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1709749503; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=MWCYv1v0m9ThdSU1Yjo1XvUgYihcegNMceRH273060M=; b=2EdyV/lzjKYtgXxzm48C/swRMa/YDHPJvqXzMHXupfNX2s5LyQ5ySuFGjgVFT/9VI7fD1G YUbItVoLzqMXXdmRTfXFICsGY71FX6me9RNqGfpYQx1ZjsHkGA7PFUfKu2gX6ns1tGxh8l elZndeW5iDCOip9Jb7FyK7igEMFR+04= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=HXzRUPyn; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf29.hostedemail.com: domain of 3_rToZQYKCEEvxuhqejrrjoh.frpolqx0-ppnydfn.ruj@flex--surenb.bounces.google.com designates 209.85.219.202 as permitted sender) smtp.mailfrom=3_rToZQYKCEEvxuhqejrrjoh.frpolqx0-ppnydfn.ruj@flex--surenb.bounces.google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1709749503; a=rsa-sha256; cv=none; b=mwg3qa5jLLFzA1l7HuEmJTbdujuOblMev1+DNPJRPsrCL0WL5ap7DBjMw4pyME5m4YsR6c eUt+ewTMqkITtSMmiFJzDUoS2O9c5mp5Oc82xdi0qyDIhufQgR+fNsTJDVz7p7CMqpkoC0 W7sxN0fUkTZKNAfW0OkMKhQxUXgIsQw= Received: by mail-yb1-f202.google.com with SMTP id 3f1490d57ef6-dcdc3db67f0so1395906276.1 for <linux-mm@kvack.org>; Wed, 06 Mar 2024 10:25:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1709749502; x=1710354302; darn=kvack.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=MWCYv1v0m9ThdSU1Yjo1XvUgYihcegNMceRH273060M=; b=HXzRUPynex3vNGhtMdLNSvSTBf0v1qNEq+91+qJBCxyig4/rd9E56cvmBqPs5TDb7n uYZdm15gKljGJwuvCfIYNTkMKvFm8syzc2re/setRQKEud+k+4ddg5KbH6kL4SUA4l2C Hh4Czu5gvLrbNG6KgLSGLiFiyh+A1GQ3m4x15fIL2TjpLl0abuiCeg3cYgcLpfIRy1vH 3+3CK4rd3Wu5R/FD1Wkke/+ogLXIa2iaAEcKMl3zYn31fOiTkp1lnjBCjvUdg25v+pVw bwjY/mVr8Yt+Q1oARnkE4VU0Ipm4c81jBDAOPqW4BpyecLSgSwJQS5I4Pz62p9r/yz8T rOhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709749502; x=1710354302; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=MWCYv1v0m9ThdSU1Yjo1XvUgYihcegNMceRH273060M=; b=Pkp++fX6FBJ4PSqa4wovbeBJ1IvaqRa5FvpHt3cmY9XHUnPuH9si1pa/hs+FpAQTLj FZZtGIqFgXxatCvCGYNks14cSjD+dbdrJzChyIRsFXXqjWCFVoPhuqWEZPjf9Ud7OHLg 9Ea1gEPL2Dc3reXpRGxdQ6nWcDgXygK5Uc56w/1rFwcpWqp2oZAilEP0/HccIQJbF/cU ckvHeRgxo0usFwlu2rzUh9MluBd3nK1ETnqmiait/EdVvi0hMtOYr5BAqpzyjtaLaLmz HeM8g9rmHvNZxjm38jasvr9ex83jL57Xjb18EWsuhT0feB6Bx6C64jWKU4ZVOoLKtujm b2tw== X-Forwarded-Encrypted: i=1; AJvYcCVyHOaQUTq3fiYq1SdGCv5pOYatEzxgUkdq6IgYaoYGB+GL8kj9Gd+XSiNr0Dj45188Qe9f3rAOVEDsYQPT4tBDi4Q= X-Gm-Message-State: AOJu0YyVzMjS6+PVHqqvn1abQ/6EiRyxSvRftDyVrWNWG6XzL3Kt16VP 6i4Hrp4KAUtRfWfh+hEPI1zVX9FaFpWxw/E7S/IPu8KAttJvRPmS3WOUMw8CA8H1+HG+1hdDmnk Jjg== X-Google-Smtp-Source: AGHT+IGnljfjTXizPPHvZAgx20zMOkYizKuctvx7GCLoCP3KSTZj+nHPn74pStdoBYj7G+M/rBJH3HI3tiw= X-Received: from surenb-desktop.mtv.corp.google.com ([2620:15c:211:201:85f0:e3db:db05:85e2]) (user=surenb job=sendgmr) by 2002:a5b:54c:0:b0:dc7:5925:92d2 with SMTP id r12-20020a5b054c000000b00dc7592592d2mr1248065ybp.1.1709749502066; Wed, 06 Mar 2024 10:25:02 -0800 (PST) Date: Wed, 6 Mar 2024 10:24:06 -0800 In-Reply-To: <20240306182440.2003814-1-surenb@google.com> Mime-Version: 1.0 References: <20240306182440.2003814-1-surenb@google.com> X-Mailer: git-send-email 2.44.0.278.ge034bb2e1d-goog Message-ID: <20240306182440.2003814-9-surenb@google.com> Subject: [PATCH v5 08/37] mm/slab: introduce SLAB_NO_OBJ_EXT to avoid obj_ext creation From: Suren Baghdasaryan <surenb@google.com> To: akpm@linux-foundation.org Cc: kent.overstreet@linux.dev, mhocko@suse.com, vbabka@suse.cz, hannes@cmpxchg.org, roman.gushchin@linux.dev, mgorman@suse.de, dave@stgolabs.net, willy@infradead.org, liam.howlett@oracle.com, penguin-kernel@i-love.sakura.ne.jp, 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, jhubbard@nvidia.com, 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, aliceryhl@google.com, rientjes@google.com, minchan@google.com, kaleshsingh@google.com, surenb@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" X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 2EC00120010 X-Stat-Signature: hpnkcn5x9h6gsr3c8nasbxsc9hk8suju X-HE-Tag: 1709749503-414281 X-HE-Meta: U2FsdGVkX18ter1Agriar63nOnbARfNQFFw6vgnyoEzcUYzOuBUc94y8jIKpDrwbO3/zqokobf4ePXqYOcUVBIZCf3731gLJB6QVi+vdBYkK1zkEiOwGjxiR/Iw181JH/E8KkOBhe9GJmYofc4XR9J8XOFcqKAQrSjr2HI8fS8eYVeNEO/zcCh7+ZJVHGJQAx28HXSfLc1gIvtetdeEccrz2+qN8WKwRJDaoiNCGAyGgqgGYyDv+67ih2ZDEGG8uXSrKeiPG8i9Z4lKvSMVQAlexWG8V3mMa5EBuoUdR1x7fIf1dG+S/hhoD0ikCtACSCcRQ/zbhqqvWbqiswoJP/J0kZq828B5D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T1N3gHG1o37iMZ8PFon88GAwRM06h3uKtTqzQ== 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: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
Memory allocation profiling
|
expand
|
diff --git a/include/linux/slab.h b/include/linux/slab.h index b5f5ee8308d0..58794043ab5b 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h @@ -28,6 +28,12 @@ */ /* DEBUG: Perform (expensive) checks on alloc/free */ #define SLAB_CONSISTENCY_CHECKS ((slab_flags_t __force)0x00000100U) +/* Slab created using create_boot_cache */ +#ifdef CONFIG_SLAB_OBJ_EXT +#define SLAB_NO_OBJ_EXT ((slab_flags_t __force)0x00000200U) +#else +#define SLAB_NO_OBJ_EXT 0 +#endif /* DEBUG: Red zone objs in a cache */ #define SLAB_RED_ZONE ((slab_flags_t __force)0x00000400U) /* DEBUG: Poison objects */ diff --git a/mm/slub.c b/mm/slub.c index 2ba5d7b2711d..e94d3cc1b270 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -5704,7 +5704,8 @@ void __init kmem_cache_init(void) node_set(node, slab_nodes); create_boot_cache(kmem_cache_node, "kmem_cache_node", - sizeof(struct kmem_cache_node), SLAB_HWCACHE_ALIGN, 0, 0); + sizeof(struct kmem_cache_node), + SLAB_HWCACHE_ALIGN | SLAB_NO_OBJ_EXT, 0, 0); hotplug_memory_notifier(slab_memory_callback, SLAB_CALLBACK_PRI); @@ -5714,7 +5715,7 @@ void __init kmem_cache_init(void) create_boot_cache(kmem_cache, "kmem_cache", offsetof(struct kmem_cache, node) + nr_node_ids * sizeof(struct kmem_cache_node *), - SLAB_HWCACHE_ALIGN, 0, 0); + SLAB_HWCACHE_ALIGN | SLAB_NO_OBJ_EXT, 0, 0); kmem_cache = bootstrap(&boot_kmem_cache); kmem_cache_node = bootstrap(&boot_kmem_cache_node);