From patchwork Mon Aug 19 15:15:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suren Baghdasaryan X-Patchwork-Id: 13768492 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 51DE7C52D6F for ; Mon, 19 Aug 2024 15:15:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6FE206B0096; Mon, 19 Aug 2024 11:15:28 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6AA1F6B0098; Mon, 19 Aug 2024 11:15:28 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4D6426B0099; Mon, 19 Aug 2024 11:15:28 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 2D6D36B0096 for ; Mon, 19 Aug 2024 11:15:28 -0400 (EDT) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id D65911A131C for ; Mon, 19 Aug 2024 15:15:27 +0000 (UTC) X-FDA: 82469343894.28.16E01C5 Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) by imf08.hostedemail.com (Postfix) with ESMTP id 19BE216002E for ; Mon, 19 Aug 2024 15:15:25 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=HLgcLooE; spf=pass (imf08.hostedemail.com: domain of 3jWHDZgYKCJoMOL8H5AIIAF8.6IGFCHOR-GGEP46E.ILA@flex--surenb.bounces.google.com designates 209.85.219.202 as permitted sender) smtp.mailfrom=3jWHDZgYKCJoMOL8H5AIIAF8.6IGFCHOR-GGEP46E.ILA@flex--surenb.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1724080422; 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=YvUli7DxjvCadNZqU9R55CXUnn1ASOBr3/ifBorIX/s=; b=AF7Khg0RA5QPLCI9+1IvCRmJmchhYfh9vUZmW7QXu1C2iX+6lCtX9Hqg1S7z5oEsKD+YcV IizYqYi8cxi7dbGexa+XW4NJeesT0p9vA1TvAoaNzL5/POu3UN3GGkEl6IXm8Ni0BPerX2 b2zxYGp/T3DIMIcYISiRWMz24CMsffM= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=HLgcLooE; spf=pass (imf08.hostedemail.com: domain of 3jWHDZgYKCJoMOL8H5AIIAF8.6IGFCHOR-GGEP46E.ILA@flex--surenb.bounces.google.com designates 209.85.219.202 as permitted sender) smtp.mailfrom=3jWHDZgYKCJoMOL8H5AIIAF8.6IGFCHOR-GGEP46E.ILA@flex--surenb.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1724080422; a=rsa-sha256; cv=none; b=aVUdGY5T4XvHSv/e320M72RCX1s7JaXSsJOjaB6igwqqNxK/iTIfF6/M2WhaIuA6kemC3u s5/Uu/axtydzBe+3+ss4hSU5BCR3/Qp7jtkD7qXGlqvulQE5BkMuDDVYagx6Hs2/L+l0rj Ivc9PhcfCodZ7iZlxixYtgRI+xpJ6aM= Received: by mail-yb1-f202.google.com with SMTP id 3f1490d57ef6-e163641feb9so1530466276.0 for ; Mon, 19 Aug 2024 08:15:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1724080525; x=1724685325; 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=YvUli7DxjvCadNZqU9R55CXUnn1ASOBr3/ifBorIX/s=; b=HLgcLooEykRM7HGDE1+JqlsK0iZ3qbV3iifyhi0XwkPEFf44RhqDkIE+8bFDrzIZRK PC+saNsX6rb0aBYdQWrOeBzsBTFTLQ/OxLYTDLAeJPEOLKismEr9G4oLPduPa2fTssPE Ux9JkIHPA5IFtCQEb6krpgbT9b2F+kt+kH8j0Kcs5WXavCX/IMgnc2980nEduDNVinsl rDbE7GkXKg1AjMwFx2dB4rQGAGR0PMEIoWAHkCfRjL8UKHCFtsfcLucnEvR78Z5h5BI+ QsYm3hM72DzNKmUUqnogkV+r5kaUSudOGi3g3BFjAgq4uNpMh6er/JCt663Gh1S5sjBc g5AQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724080525; x=1724685325; 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=YvUli7DxjvCadNZqU9R55CXUnn1ASOBr3/ifBorIX/s=; b=CqeN3UW333dOu7bcQ2xVKU8O+B9+Cw0olt2vCl9BSp71Ys5GwqmV4b3kIbDgdKu/Ep B+C1RLe9c1HguU9S/UZ/91fsCMwCr/8hrZqM5aN6TLbkmThbsSlocTCOsaYjRMWrFcPP sUZ6WItsb4jEvEEHnBmXULIcpADIU8lZQQGUwn19Yc1jQFm5KQ8fVGgxyipZ3woSIiQf eB9FkTHVmcTMR3WWALcsRDSIr4Jg6NBSnFJ/wgPwnhJ2fbvIpKY42Ay8ty7Bv/+/hXLU WfsMCQckBt3m1+w9Bh9vWTulUj2rZpy6zOFKBROAdkTib6U+RxNVgoGFg3b5OkztBkV+ QiGw== X-Forwarded-Encrypted: i=1; AJvYcCV4RQknRJ0YcSzSdZsTvaHF/R+V+rsv0dwGvGJsgzX0mMy8b77nNeJv8aPpQHUgQphAxv6NL4fymGz+eDRUPDO+fz0= X-Gm-Message-State: AOJu0YyMFhKoc4JySFceX00j+iKBTHxGZk9uOpJ9vgk9v09sWXdorUkS u7QWn5y+hI+5N/ZAJ/txd4aA8G4WtsZYr604YISDJlTJZiwfiMAaKTHJd6cMlCAkpcZkGnX6hEp u+Q== X-Google-Smtp-Source: AGHT+IGmKKGKkjcmWysWP9m62+j5ch91LeGhxiVj6StWd2Ak+bhrYPJ7oEQRjLH7HKKJlPCdxmQ+SytC38U= X-Received: from surenb-desktop.mtv.corp.google.com ([2620:15c:211:201:5aea:cf26:50f4:76db]) (user=surenb job=sendgmr) by 2002:a25:951:0:b0:e0b:af9b:fb94 with SMTP id 3f1490d57ef6-e1182f824e6mr313544276.6.1724080525039; Mon, 19 Aug 2024 08:15:25 -0700 (PDT) Date: Mon, 19 Aug 2024 08:15:11 -0700 In-Reply-To: <20240819151512.2363698-1-surenb@google.com> Mime-Version: 1.0 References: <20240819151512.2363698-1-surenb@google.com> X-Mailer: git-send-email 2.46.0.184.g6999bdac58-goog Message-ID: <20240819151512.2363698-6-surenb@google.com> Subject: [PATCH 5/5] 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: rspam06 X-Rspamd-Queue-Id: 19BE216002E X-Stat-Signature: brww6ogjct6mbu3r6j916m5niij8zwbj X-Rspam-User: X-HE-Tag: 1724080525-195366 X-HE-Meta: U2FsdGVkX1+nA4OxgT5vQC0ZMhuAPQprCMYEf/8iok6qXLTV/gEeWSZzC+7G7E7FOyW+opjtOb1/xGz0SWQ94tzlBHadtU6cvkFZU5fYKMltLOe128u5A7s88hErMczF61P19IJ/Tkvt1EwqGAzpnZJDm+O+lnZ7q/u8IIRnLTLlm8aam4QOt/uzURL/xMQbi8W3YWaERxI3vcG1JW2sxQYF8d++Bf+vf5h6muTDxTGHdmVgZFgAjfpsUMc3vttml374wDPAjReprmfaXXcuPU16YRKjNVOCchd0GRVl/CSKQlj3rEk1Lw7czeQA3vKlyHjp1vnaSMLJrMHa3BY60drjpkVbIKNj2zZtA+SZZrUjH1xYOBUuYcUC4kKLXsEUMGKHSlqm0/FSt74dKkXe5wP08ucOfNGONJ90LBIx3P7shfuaTnzszuLP0tAwqIVIp8PuubPtRCPo1SlhAmkRrZIVyTpxXQyo8q6LhPGX/jppmj6Svy1yxroPtRHU1G+Q5ag8CRKeZxl35QU9/zo8oVW09gVCaTt668r1nng/hpWY/5f3F9LfHD5weUo+3Oq32m5wITIGFpRgG3cS7qMvzWu5PBGigzYKD6ZQpyY2OJp4dgGlJbkEdOYewkZudHRIG1+XNchG3uyB4cno+K+PdfTeTK3SB/wSJsv/H6MtHvdk6V04qkQDhW03Qgxdw4ULRcbAxmkskmCx6oZbcn7ylUACuEBsKMYSi0TFuvpV9x+Stdc/LzONTWLXPaeLxbdS2+wR3x3QwHqLhPkVD4Q0qBiSDx2mhWH8D51VyjE18IEhaIN7//DEPcRTUMxnfWr9yF1scEsMuofQPx+Z2gNM7dWXE4Nwxe7sWU1NqPfK8TSLbD91ZzEECPaeX+StA4Fvx6QEVW1zhp9/GN/iJjcHnxJkPYNHm8cHdXLlaEgcD1YOv3B+MkQ7knqD+R4oIekUYyhKTI59P3JbPBLGrk+ Z4BPDOKP OZ8Mw7PTZVTaw4kFFTFlgrzw7/PG6s6xvcF+F75gVGfy2y2zHvXi4Q4KpSnQCF4J6NMO/H296wBfTrxaBI8BmpE/CWobqbtvVDYQSsht8Fb1abojK9rKlfF4Ux1185ri9BUNouScUdEYT7KAX1k5KqIA+cOWJb7pm13m8TwJSeOg1j2t5cb/VQ5u2sfOXpkfDFVGunZyACiY8ZZRucNCmHLEiff1wLAsbfo4bvbIzkX8hrDJgkGGy8IncylCkmuHkIlfUd95aeWDPkjyThDsraN9jAiXt07F6MSr3xNv83x5fLqOCt/hcxf3DFkHqJObY/IIU6e21ChCiF+8a3HMdDbo9sKaT2xYeAuYdjJXNVNaKY5LKZSNAcC4ysBO650dVSDBci21yKqdnsh1z+4GbEoo7LOHBa3oZfNsO9iSEdzGbme6op4iLf6UC2oooTfkatHWjEOaBwsqUFX4yBgVJECCelE2LDCpOhfmKy1OrXs3s3BOgfbFurYp4dcu+RgscbrMn2e2rl4XOq8l0ydV0OWzsI9xfvfziK0dR/8WUrpojpZN1TrKghUKnzw== 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 80b8801cb90b..da95c09bcdf1 100644 --- a/include/linux/pgalloc_tag.h +++ b/include/linux/pgalloc_tag.h @@ -88,6 +88,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; @@ -136,6 +182,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 d0da206d539e..1fbe80e68fdb 100644 --- a/lib/alloc_tag.c +++ b/lib/alloc_tag.c @@ -432,6 +432,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; @@ -448,6 +450,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