From patchwork Mon Sep 2 04:41:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suren Baghdasaryan X-Patchwork-Id: 13786706 Return-Path: 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 5846DC54FC6 for ; Mon, 2 Sep 2024 04:41:52 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C9C8F8D0072; Mon, 2 Sep 2024 00:41:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C5D058D0065; Mon, 2 Sep 2024 00:41:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AA04C8D0072; Mon, 2 Sep 2024 00:41:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 8435E8D0065 for ; Mon, 2 Sep 2024 00:41:47 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 4105341A28 for ; Mon, 2 Sep 2024 04:41:47 +0000 (UTC) X-FDA: 82518550254.13.230F5AB Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) by imf09.hostedemail.com (Postfix) with ESMTP id 6D37E140007 for ; Mon, 2 Sep 2024 04:41:45 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=N6qazXVZ; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf09.hostedemail.com: domain of 3CELVZgYKCB8NPM9I6BJJBG9.7JHGDIPS-HHFQ57F.JMB@flex--surenb.bounces.google.com designates 209.85.219.202 as permitted sender) smtp.mailfrom=3CELVZgYKCB8NPM9I6BJJBG9.7JHGDIPS-HHFQ57F.JMB@flex--surenb.bounces.google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1725252001; 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=o+zkIQ79nR91+bZ9fiMOs0/SZD3fit87wxI6zeuv5qM=; b=QQgNuqGYS7ud3zXXEq0z0ZfSE7eEXYTtpDCPC1sKZSMiZVUtnhTT0/aiFozmaTrqq7Y7+W G09D75VXdZpjUHm0++EO/ttJ4sXPsTBDihd0iwSJLdco12fqKnJYz4T4Ef03DY9f0dtDYf lL7TKKgWD0EVYTnlfggxXVSIFRlsv9s= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1725252001; a=rsa-sha256; cv=none; b=JuL1s1CvChHLUA6jyDLdHRkOPsOcymZ1F79FkEiwHUr7j0RqBVCGcJFIbVx9v360Q7uRqB xb0emaPGMpexrr1PTPRUuNSBL2Is5q7kvKwB7XTazJlfFVjw0PaWtD2SXRzg85nS/HiEVB qQ5W0t3SEJIxxii/A9PqNUJExjBmSmk= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=N6qazXVZ; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf09.hostedemail.com: domain of 3CELVZgYKCB8NPM9I6BJJBG9.7JHGDIPS-HHFQ57F.JMB@flex--surenb.bounces.google.com designates 209.85.219.202 as permitted sender) smtp.mailfrom=3CELVZgYKCB8NPM9I6BJJBG9.7JHGDIPS-HHFQ57F.JMB@flex--surenb.bounces.google.com Received: by mail-yb1-f202.google.com with SMTP id 3f1490d57ef6-e1ce98dcafaso70265276.0 for ; Sun, 01 Sep 2024 21:41:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1725252104; x=1725856904; 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=o+zkIQ79nR91+bZ9fiMOs0/SZD3fit87wxI6zeuv5qM=; b=N6qazXVZtYrPlQrJ/4juZx/lqIiMRbEiqq84g+V3/6xuYEfqMtgDBsfGCKeqcv4X8i zaaomHyq7H5KyMhFu60bsuDO/VfRgwgFVoON8nSGM8gbYzrq7MOOylBh9Iq7dq7wm1iL pxH/JRlzAqXOUfwjrKcoUapB5BujkRDNmAVQDySit4VQzwGzvZZhMjpF7xn4xwsNbEPl fiioh2AP3eOPMd8XWHOm2zbOYfD5cPvHD9pvA7W/26jOXZrUXxLh+EVC0lrwPRLQkrzP y0dzY8E3RFR+G+/a+p7J4iDoze3WPbuTQnRoat28CWINnWDOv0+8F2itoH1GG77jJwrt peLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725252104; x=1725856904; 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=o+zkIQ79nR91+bZ9fiMOs0/SZD3fit87wxI6zeuv5qM=; b=L0SnOMvU54xsA4aZtt8hE5N7KTLgvQzz5x+5QIm2fkx03QEj3phvkukhPclngxzsDj BtMD+0tIevtk6aNKHEOTh1BRgzM99ITSIXLQENPiEELz2Awp0IP5q7Rj2KZup/gKa6To MCPiSq0qR6DNcyHfu9PEeCe47aftwl/45IRYKQaG6eCwfYAVWx4vVouwJl1bPg4V3TcA OfjZk2PTwk3s13DUAYzBNMh7p71gJUBJLTl0R5j+xXuPt1cHkMkeaaS74q/m+GyPZvlC /n0Pn/F7snDh1iCeF4epoEqBL2Vbz13y+iE3P2ySfLD62E15R3WH8qa1AHV/B3xp6x+H JIRg== X-Forwarded-Encrypted: i=1; AJvYcCUKzFyVE4O8d2goMrKWaouujn/H8B2+90K4OXUhLl4ZX+ZNNVUCydhGO8IajJhOShqDtr22M59xTg==@kvack.org X-Gm-Message-State: AOJu0YwCSghMeMknuyuThAGSt5syxY3Q71B49iHRTvcg/pc9/f2+0Loo OY41BdxHR+T6BD2J62M2K/4jTYTWPkWAw5KNem3WqHIMseUKqCxqFjYNsrhhAl0plUAEOYyqosf QFQ== X-Google-Smtp-Source: AGHT+IGESmFEaOyUz7H46Wj9ZUskazUKRvv1KzwKzYF26vqNkzVhO5DbeT/NbEzV1QldF78OxMgid1k7qes= X-Received: from surenb-desktop.mtv.corp.google.com ([2620:15c:211:201:7343:ecd2:aed:5b8f]) (user=surenb job=sendgmr) by 2002:a05:6902:1b0a:b0:e0b:a2a7:df77 with SMTP id 3f1490d57ef6-e1a79faf966mr117475276.2.1725252104383; Sun, 01 Sep 2024 21:41:44 -0700 (PDT) Date: Sun, 1 Sep 2024 21:41:28 -0700 In-Reply-To: <20240902044128.664075-1-surenb@google.com> Mime-Version: 1.0 References: <20240902044128.664075-1-surenb@google.com> X-Mailer: git-send-email 2.46.0.469.g59c65b2a67-goog Message-ID: <20240902044128.664075-7-surenb@google.com> Subject: [PATCH v2 6/6] alloc_tag: config to store page allocation tag refs in page flags From: Suren Baghdasaryan To: akpm@linux-foundation.org Cc: kent.overstreet@linux.dev, corbet@lwn.net, arnd@arndb.de, mcgrof@kernel.org, rppt@kernel.org, paulmck@kernel.org, thuth@redhat.com, tglx@linutronix.de, bp@alien8.de, xiongwei.song@windriver.com, ardb@kernel.org, david@redhat.com, vbabka@suse.cz, mhocko@suse.com, hannes@cmpxchg.org, roman.gushchin@linux.dev, dave@stgolabs.net, willy@infradead.org, liam.howlett@oracle.com, pasha.tatashin@soleen.com, souravpanda@google.com, keescook@chromium.org, dennis@kernel.org, jhubbard@nvidia.com, yuzhao@google.com, vvvvvv@google.com, rostedt@goodmis.org, iamjoonsoo.kim@lge.com, rientjes@google.com, minchan@google.com, kaleshsingh@google.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, linux-modules@vger.kernel.org, kernel-team@android.com, surenb@google.com X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 6D37E140007 X-Stat-Signature: h1xzbnptmocm5tigzrujth8c7jfonxwo X-Rspam-User: X-HE-Tag: 1725252105-56374 X-HE-Meta: U2FsdGVkX189QFLseU3H6sCcfrYYRXlkNHpjr5rlAU9uipx3iDw85EstR1S88NdgZhFg0jvKq0g+mvcnPsKPQCLWxtcD35anZ9nCgoheU6H8E1PTbwVLLKJjYJ+yHqzQ8nxPdBNTXlvj47mNIayU/P4i7tsYNghMSPuhHDE2k2oXLJf/MNSgc/tNaD1V7tAt8jX0sbbmlTT1Yar82NLszv1qgOEUDCnGKDRjOn9WKce+lrrjiyumKJlZl0ClV4vBeVeKEAj3qoVgEzB+oSmNRdkevfFBX9qSa61kl96+Nl7l5vsN/UXlpfHtKHRYfXJTp0e06qHdyyjou4xYXD3J1Cib/M0j3nzxPFxCf3B+ODpo+YdgzmXZjRwt86o/xu3Jgj4NDA8nUQeADpxsZt6WgCTMEz5Vzp75PS8rL8t3CLqAETWVfOkkh9w9/UmMFtfLupNB2gL393MUePQAAQ07ER0sARJQwxc00s5N0O5OC3WSZ+QtSg1SrykyH2azuXbaT3Ytphr3BY4IHUmUR9dPt0fIkU/kg33zqi0jsbvFvANva/8PTNyUyNRMo0Jep2sUD7aoSE5p47hzv+NRfaCnjvvbvauePf0KLV+P47h5hxGCpuAXiTT4PDQseq8cdRZAn0Vw6th1HJnS/P/nCA5jr4RYhGHIXyxGTaXa9MgvPT+9FL2Cdw3A07MytMJBGtnMLh7Fcm5u5WEmWofdpWQT/Up3OBM8PPUMoRk5s47EryqLycOKb0J3kS7Rcs3cGVr6eQZ8cYGAtLcI2v694SAXZzoPeqM8KFEyZ5QNVf/sdU81FHEAQ9l3M6CkFFqfwpvnFm1GNV/Lfcmq9RoWRusUyUqIkM2cJbG9mqBj8lrAx+I37+Jd4CZfpbtkh2ruXOHaFYBJl1pJyN+t+XxdXYiERCMZNUmdkgylgv1mOfW2erNk4322oJ+IWviXf3hUw1x9l/JVpKI2bKL5G2+0/Gj h//2tWnc lwqBkuDz4nXZd0eN2K1y4NxMJdNKhGtGAFlSTsUeztiCfCctSOXj4QqbxWA4Fdzi/GZbMQo3blxL6u69TYZHHfxHZeDxRl+u0bRG6+KYagJ0l/hfZ42JL674Tm58tqUmotx3Cx76/pIvmgKMYHfiwQYGNv94scZjFxISmFefUNGUkG7PpAYc78aCOF+H42tXqFgwcqnUf3nBVhTZSBHV1okMDJ2Knsh33tlIE0/sw6hVQtX/IB5vK3ZLy1r7a68bHex7Kxg/WY3yFbZon7ISBoHzs/ZG7pBajzC5T/wPi3nTrND0xGARuaJATiJOGJmZOk9lDDzvBwNA8I1qRc6eYdSP1jhg7uLDf/z2fLnZtiZTS8VUn94oGyVQTZOa7aIejN11ZzvrsGK0wgL1qrAIInQTw7fT/zG14vuHA0Vu8L0e3ntd30sS/ZXKeQ3xMq/Tfx0qrQVEMvVIQMREBDJaxjiPZODRUgWfjmTLzGB8GvpKY2H9Z33aL2ZMexGDtZIKEaHY1yB5w7MuEvtZ8xez70brGy8dpOpgyZPDFaPacUEGZny1DZ7p7zbnlf10ovQijM7FgRmaIeRIav95+oS5rmyPvhw== 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: List-Subscribe: List-Unsubscribe: Add CONFIG_PGALLOC_TAG_USE_PAGEFLAGS to store allocation tag references directly in the page flags. This removes dependency on page_ext and results in better performance for page allocations as well as reduced page_ext memory overhead. CONFIG_PGALLOC_TAG_REF_BITS controls the number of bits required to be available in the page flags to store the references. If the number of page flag bits is insufficient, the build will fail and either CONFIG_PGALLOC_TAG_REF_BITS would have to be lowered or CONFIG_PGALLOC_TAG_USE_PAGEFLAGS should be disabled. Signed-off-by: Suren Baghdasaryan --- include/linux/mmzone.h | 3 ++ include/linux/page-flags-layout.h | 10 +++++-- include/linux/pgalloc_tag.h | 48 +++++++++++++++++++++++++++++++ lib/Kconfig.debug | 27 +++++++++++++++-- lib/alloc_tag.c | 4 +++ mm/page_ext.c | 2 +- 6 files changed, 89 insertions(+), 5 deletions(-) diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 17506e4a2835..0dd2b42f7cb6 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -1085,6 +1085,7 @@ static inline bool zone_is_empty(struct zone *zone) #define KASAN_TAG_PGOFF (LAST_CPUPID_PGOFF - KASAN_TAG_WIDTH) #define LRU_GEN_PGOFF (KASAN_TAG_PGOFF - LRU_GEN_WIDTH) #define LRU_REFS_PGOFF (LRU_GEN_PGOFF - LRU_REFS_WIDTH) +#define ALLOC_TAG_REF_PGOFF (LRU_REFS_PGOFF - ALLOC_TAG_REF_WIDTH) /* * Define the bit shifts to access each section. For non-existent @@ -1096,6 +1097,7 @@ static inline bool zone_is_empty(struct zone *zone) #define ZONES_PGSHIFT (ZONES_PGOFF * (ZONES_WIDTH != 0)) #define LAST_CPUPID_PGSHIFT (LAST_CPUPID_PGOFF * (LAST_CPUPID_WIDTH != 0)) #define KASAN_TAG_PGSHIFT (KASAN_TAG_PGOFF * (KASAN_TAG_WIDTH != 0)) +#define ALLOC_TAG_REF_PGSHIFT (ALLOC_TAG_REF_PGOFF * (ALLOC_TAG_REF_WIDTH != 0)) /* NODE:ZONE or SECTION:ZONE is used to ID a zone for the buddy allocator */ #ifdef NODE_NOT_IN_PAGE_FLAGS @@ -1116,6 +1118,7 @@ static inline bool zone_is_empty(struct zone *zone) #define LAST_CPUPID_MASK ((1UL << LAST_CPUPID_SHIFT) - 1) #define KASAN_TAG_MASK ((1UL << KASAN_TAG_WIDTH) - 1) #define ZONEID_MASK ((1UL << ZONEID_SHIFT) - 1) +#define ALLOC_TAG_REF_MASK ((1UL << ALLOC_TAG_REF_WIDTH) - 1) static inline enum zone_type page_zonenum(const struct page *page) { diff --git a/include/linux/page-flags-layout.h b/include/linux/page-flags-layout.h index 7d79818dc065..21bba7c8c965 100644 --- a/include/linux/page-flags-layout.h +++ b/include/linux/page-flags-layout.h @@ -5,6 +5,12 @@ #include #include +#ifdef CONFIG_PGALLOC_TAG_USE_PAGEFLAGS +#define ALLOC_TAG_REF_WIDTH CONFIG_PGALLOC_TAG_REF_BITS +#else +#define ALLOC_TAG_REF_WIDTH 0 +#endif + /* * When a memory allocation must conform to specific limitations (such * as being suitable for DMA) the caller will pass in hints to the @@ -91,7 +97,7 @@ #endif #if ZONES_WIDTH + LRU_GEN_WIDTH + SECTIONS_WIDTH + NODES_WIDTH + \ - KASAN_TAG_WIDTH + LAST_CPUPID_SHIFT <= BITS_PER_LONG - NR_PAGEFLAGS + KASAN_TAG_WIDTH + ALLOC_TAG_REF_WIDTH + LAST_CPUPID_SHIFT <= BITS_PER_LONG - NR_PAGEFLAGS #define LAST_CPUPID_WIDTH LAST_CPUPID_SHIFT #else #define LAST_CPUPID_WIDTH 0 @@ -102,7 +108,7 @@ #endif #if ZONES_WIDTH + LRU_GEN_WIDTH + SECTIONS_WIDTH + NODES_WIDTH + \ - KASAN_TAG_WIDTH + LAST_CPUPID_WIDTH > BITS_PER_LONG - NR_PAGEFLAGS + KASAN_TAG_WIDTH + ALLOC_TAG_REF_WIDTH + LAST_CPUPID_WIDTH > BITS_PER_LONG - NR_PAGEFLAGS #error "Not enough bits in page flags" #endif diff --git a/include/linux/pgalloc_tag.h b/include/linux/pgalloc_tag.h index a7f8f00c118f..dcb6706dee15 100644 --- a/include/linux/pgalloc_tag.h +++ b/include/linux/pgalloc_tag.h @@ -118,6 +118,52 @@ static inline void write_pgref(pgalloc_tag_ref *pgref, union codetag_ref *ref) void __init alloc_tag_sec_init(void); #endif /* PGALLOC_TAG_DIRECT_REF */ + +#ifdef CONFIG_PGALLOC_TAG_USE_PAGEFLAGS + +typedef struct page *pgtag_ref_handle; + +/* Should be called only if mem_alloc_profiling_enabled() */ +static inline pgtag_ref_handle get_page_tag_ref(struct page *page, + union codetag_ref *ref) +{ + if (page) { + pgalloc_tag_ref pgref; + + pgref = (page->flags >> ALLOC_TAG_REF_PGSHIFT) & ALLOC_TAG_REF_MASK; + read_pgref(&pgref, ref); + return page; + } + + return NULL; +} + +static inline void put_page_tag_ref(pgtag_ref_handle page) +{ + WARN_ON(!page); +} + +static inline void update_page_tag_ref(pgtag_ref_handle page, union codetag_ref *ref) +{ + unsigned long old_flags, flags, val; + pgalloc_tag_ref pgref; + + if (WARN_ON(!page || !ref)) + return; + + write_pgref(&pgref, ref); + val = (unsigned long)pgref; + val = (val & ALLOC_TAG_REF_MASK) << ALLOC_TAG_REF_PGSHIFT; + do { + old_flags = READ_ONCE(page->flags); + flags = old_flags; + flags &= ~(ALLOC_TAG_REF_MASK << ALLOC_TAG_REF_PGSHIFT); + flags |= val; + } while (unlikely(!try_cmpxchg(&page->flags, &old_flags, flags))); +} + +#else /* CONFIG_PGALLOC_TAG_USE_PAGEFLAGS */ + #include extern struct page_ext_operations page_alloc_tagging_ops; @@ -166,6 +212,8 @@ static inline void update_page_tag_ref(pgtag_ref_handle pgref, union codetag_ref write_pgref(pgref, ref); } +#endif /* CONFIG_PGALLOC_TAG_USE_PAGEFLAGS */ + static inline void clear_page_tag_ref(struct page *page) { if (mem_alloc_profiling_enabled()) { diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 253f9c2028da..9fc8c1981f27 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -979,7 +979,7 @@ config MEM_ALLOC_PROFILING depends on PROC_FS depends on !DEBUG_FORCE_WEAK_PER_CPU select CODE_TAGGING - select PAGE_EXTENSION + select PAGE_EXTENSION if !PGALLOC_TAG_USE_PAGEFLAGS select SLAB_OBJ_EXT help Track allocation source code and record total allocation size @@ -1000,10 +1000,26 @@ config MEM_ALLOC_PROFILING_DEBUG Adds warnings with helpful error messages for memory allocation profiling. +config PGALLOC_TAG_USE_PAGEFLAGS + bool "Use pageflags to encode page allocation tag reference" + default n + depends on MEM_ALLOC_PROFILING + help + When set, page allocation tag references are encoded inside page + flags, otherwise they are encoded in page extensions. + + Setting this flag reduces memory and performance overhead of memory + allocation profiling but also limits how many allocations can be + tagged. The number of bits is set by PGALLOC_TAG_USE_PAGEFLAGS and + they must fit in the page flags field. + + Say N if unsure. + config PGALLOC_TAG_REF_BITS int "Number of bits for page allocation tag reference (10-64)" range 10 64 - default "64" + default "16" if PGALLOC_TAG_USE_PAGEFLAGS + default "64" if !PGALLOC_TAG_USE_PAGEFLAGS depends on MEM_ALLOC_PROFILING help Number of bits used to encode a page allocation tag reference. @@ -1011,6 +1027,13 @@ config PGALLOC_TAG_REF_BITS Smaller number results in less memory overhead but limits the number of allocations which can be tagged (including allocations from modules). + If PGALLOC_TAG_USE_PAGEFLAGS is set, the number of requested bits should + fit inside the page flags. + + If PGALLOC_TAG_USE_PAGEFLAGS is not set, the number of bits used to store + a reference is rounded up to the closest basic type. If set higher than 32, + a direct pointer to the allocation tag is stored for performance reasons. + source "lib/Kconfig.kasan" source "lib/Kconfig.kfence" source "lib/Kconfig.kmsan" diff --git a/lib/alloc_tag.c b/lib/alloc_tag.c index 73791aa55ab6..34820650186d 100644 --- a/lib/alloc_tag.c +++ b/lib/alloc_tag.c @@ -476,6 +476,8 @@ static int __init setup_early_mem_profiling(char *str) } early_param("sysctl.vm.mem_profiling", setup_early_mem_profiling); +#ifndef CONFIG_PGALLOC_TAG_USE_PAGEFLAGS + static __init bool need_page_alloc_tagging(void) { return mem_profiling_support; @@ -492,6 +494,8 @@ struct page_ext_operations page_alloc_tagging_ops = { }; EXPORT_SYMBOL(page_alloc_tagging_ops); +#endif /* CONFIG_PGALLOC_TAG_USE_PAGEFLAGS */ + #ifdef CONFIG_SYSCTL static struct ctl_table memory_allocation_profiling_sysctls[] = { { diff --git a/mm/page_ext.c b/mm/page_ext.c index 641d93f6af4c..5f993c271ee7 100644 --- a/mm/page_ext.c +++ b/mm/page_ext.c @@ -83,7 +83,7 @@ static struct page_ext_operations *page_ext_ops[] __initdata = { #if defined(CONFIG_PAGE_IDLE_FLAG) && !defined(CONFIG_64BIT) &page_idle_ops, #endif -#ifdef CONFIG_MEM_ALLOC_PROFILING +#if defined(CONFIG_MEM_ALLOC_PROFILING) && !defined(CONFIG_PGALLOC_TAG_USE_PAGEFLAGS) &page_alloc_tagging_ops, #endif #ifdef CONFIG_PAGE_TABLE_CHECK