Message ID | 20240321163705.3067592-22-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 62C16C6FD1F for <linux-mm@archiver.kernel.org>; Thu, 21 Mar 2024 16:38:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D61666B00B3; Thu, 21 Mar 2024 12:37:58 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CEC206B00B4; Thu, 21 Mar 2024 12:37:58 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AF8596B00B5; Thu, 21 Mar 2024 12:37:58 -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 976116B00B3 for <linux-mm@kvack.org>; Thu, 21 Mar 2024 12:37:58 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 6D1F5120499 for <linux-mm@kvack.org>; Thu, 21 Mar 2024 16:37:58 +0000 (UTC) X-FDA: 81921603036.01.16B62AD Received: from mail-yw1-f202.google.com (mail-yw1-f202.google.com [209.85.128.202]) by imf26.hostedemail.com (Postfix) with ESMTP id 8C9BD14001D for <linux-mm@kvack.org>; Thu, 21 Mar 2024 16:37:56 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=3EjzCEva; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf26.hostedemail.com: domain of 3Y2L8ZQYKCFAAC9w5ty66y3w.u64305CF-442Dsu2.69y@flex--surenb.bounces.google.com designates 209.85.128.202 as permitted sender) smtp.mailfrom=3Y2L8ZQYKCFAAC9w5ty66y3w.u64305CF-442Dsu2.69y@flex--surenb.bounces.google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1711039076; 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=l0NoLpdPXZUI9jv+GBaFWeUdE0u/LS8GwKny2YwhxYE=; b=a4CLVehOF2RsTEzFdzo3rKjnZXsTMWukhx+tepBFEB/TBBzb2SraGUMkkb7Y6I4+wSO15f i0tNpsGvrY3WlBA0FwKXuyZf1+Zz7dss3iPmSLm1u2CGw44yRMCXv69hesplLuyqsbfGj/ spjUh4fTglFCbP00vBMGcATBaeYxNvM= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=3EjzCEva; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf26.hostedemail.com: domain of 3Y2L8ZQYKCFAAC9w5ty66y3w.u64305CF-442Dsu2.69y@flex--surenb.bounces.google.com designates 209.85.128.202 as permitted sender) smtp.mailfrom=3Y2L8ZQYKCFAAC9w5ty66y3w.u64305CF-442Dsu2.69y@flex--surenb.bounces.google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1711039076; a=rsa-sha256; cv=none; b=a83DlxaDJXWOCl/MtpIJ0iUs2W0pi/Qr+PFb8vju+F0H7CU8czFaIwRR6TO/c4hwYr5Pr4 wzfRe0V4ApQU/Dl3tbERNVgeTc3jbze7QXj8wALu3ccCAKke64B69wBxGT+WntdcIFTF07 SIX8eccCcWY+/Uou3ypUjii2IsNfmno= Received: by mail-yw1-f202.google.com with SMTP id 00721157ae682-607838c0800so24232527b3.1 for <linux-mm@kvack.org>; Thu, 21 Mar 2024 09:37:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1711039075; x=1711643875; 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=l0NoLpdPXZUI9jv+GBaFWeUdE0u/LS8GwKny2YwhxYE=; b=3EjzCEvacTZm5kEC1Me3Sw0wMSSjtj+KkTVUIeStaB+c7nNKelXTc8HfZTvd4qnUJr WSEUhcpq/chECrXgpoYrpoDYsjmScdxxK0Yf3MgAMfnOwXO1hOEyAzjT7AqERPASkU0R x+cTVPp5ZPuvt47Z4747Qh7m367718ToncDkgnJw0q2U+259DpC85qFH+WHDuNWv7LYX PL1dlflIEeYmJryrt0gC28F55ua6+Fh6PGLRLiRwpYizi8gRI5FedGuuwnLWZUK/M7nN DwEPFsPLnyUCR6g3kriGEDiYaZP6FAnTqkWvGyd7UpHB3PbFw3S+RzsHGKfVNXrNbDSF YrSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711039075; x=1711643875; 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=l0NoLpdPXZUI9jv+GBaFWeUdE0u/LS8GwKny2YwhxYE=; b=HUHWQGN6Mn4qIk5nWn4MdI1qPcGgj65gIVRppsY/fBM1kvvCIvPKTfsRSSGfJ/SwTZ CKHiBPzfF2WWEabO1xuND9mnPeWd41yhmLQKFq0FA3vH747r16VKjV6h2p0wNBOeqyTw XAmnSQtkBkgcKqiqzHQEoEiMIdmi1j/En3CKxgEFUge1IGQPqHjd6D+BWXNixCuzKJZ0 ho4nxAounGCQsxPcg0ltZ9pYzTGOr3XXQHYIjoYip2twdhuzB54Q8eVH22Z4V00+zuwo LbpS1KepmVOsKdm+kfRsdP9ULfVUSgzcp/X+G+qOcXc5sEbDgL/EAX54n+gY2a4sQsin JKfQ== X-Forwarded-Encrypted: i=1; AJvYcCUQBbwKxo850zkuuXp5PyH9jGzfwbrzNZdyO4ywSUDrMKeimLXimF5FOCv0dn2KBOxEjlEOz+yGeKIGsECWo2YHEa4= X-Gm-Message-State: AOJu0YzLeCGrXNDIHQau7KWysZwxK8zzoVyWZ/8NvIianoAJNw+TNjqS sbamJivvq8Pqmyb6zmnlY3upn+5AkLV/thJ4QoNGyhxB3qZHcRicQqUs1BeHlMjAjk+bN7YnN7Z yvw== X-Google-Smtp-Source: AGHT+IEretF+q2ZgfU/nK2U7IsM8qgxzJOcM6j0PHFTxTRvud7ewavgn/Hqbg7folhUnncWwNi0CsjWDS2Y= X-Received: from surenb-desktop.mtv.corp.google.com ([2620:15c:211:201:a489:6433:be5d:e639]) (user=surenb job=sendgmr) by 2002:a25:ce51:0:b0:dc7:4ca0:cbf0 with SMTP id x78-20020a25ce51000000b00dc74ca0cbf0mr607569ybe.3.1711039075564; Thu, 21 Mar 2024 09:37:55 -0700 (PDT) Date: Thu, 21 Mar 2024 09:36:43 -0700 In-Reply-To: <20240321163705.3067592-1-surenb@google.com> Mime-Version: 1.0 References: <20240321163705.3067592-1-surenb@google.com> X-Mailer: git-send-email 2.44.0.291.gc1ea87d7ee-goog Message-ID: <20240321163705.3067592-22-surenb@google.com> Subject: [PATCH v6 21/37] mm/page_ext: enable early_page_ext when CONFIG_MEM_ALLOC_PROFILING_DEBUG=y 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, 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: 8C9BD14001D X-Stat-Signature: 65uzpfy8hwkcxqmcqywbpn5getmk8if3 X-HE-Tag: 1711039076-432134 X-HE-Meta: U2FsdGVkX19v01D4kBAkR+ZOy/Dm4gDYNf3mzbOl4OQ5KA2uGYcRUp2AwfjZdvM6mk9VFdMzrvbvWGcPbEp4p0mkJ5OljWrmm1ed7b86rhzJsG8X0SeO2Dit9A5KJjroHALhzY2D6wFct3kn2QKb9FCsMnNv6dAZCsvP76BnznJS24D29IETTWPNwICq4DRMllT7Yk6yXjY9xrxBNWVOfp3WXqBmYmR9czPLVymJSI1dJJY5WEO9TgDUb9J7Uo1gJ7jD47CjEab1keo404aRI/2IsfMNK2KCspVffEze1S4eKDI0PzfT5EpWUXpP2x9YyZ7AcbofXmTb8I2oY1Yd1YjIgE0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DiNSnSuLYM7+tikPTLWIbhVZNYJ10R8Wi8utMGhPJbvTl0AqMAsg/kxlAYGZTDggAgFbSDTzsN9VQgltYU0HncQdpxvu1PqK8AXbeNN1sPnlsW2fVKXb7+H4vVMf88CjVj1K1NSSz6TcKf0kOUYe2u36nv7RlKdhhB/u8A4zXBgQ1MjiDwnmsQrw9CAEF/F2ExW7iqyXcWXOUp5IdPoj1lIfn8L6uXvB2JyhkZXcVgTGZHOLF/Nl0bodF6Hbbz34Wt6xby66NpYsVwUPpn6i+t2PXjcdEevJ8up72TU8f 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/mm/page_ext.c b/mm/page_ext.c index 3c58fe8a24df..e7d8f1a5589e 100644 --- a/mm/page_ext.c +++ b/mm/page_ext.c @@ -95,7 +95,16 @@ unsigned long page_ext_size; static unsigned long total_usage; +#ifdef CONFIG_MEM_ALLOC_PROFILING_DEBUG +/* + * To ensure correct allocation tagging for pages, page_ext should be available + * before the first page allocation. Otherwise early task stacks will be + * allocated before page_ext initialization and missing tags will be flagged. + */ +bool early_page_ext __meminitdata = true; +#else bool early_page_ext __meminitdata; +#endif static int __init setup_early_page_ext(char *str) { early_page_ext = true;