Message ID | 20230501165450.15352-39-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 BBF63C77B61 for <linux-mm@archiver.kernel.org>; Mon, 1 May 2023 16:56:38 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0E817900015; Mon, 1 May 2023 12:56:38 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0989C900002; Mon, 1 May 2023 12:56:38 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E7AC5900015; Mon, 1 May 2023 12:56:37 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id D9136900002 for <linux-mm@kvack.org>; Mon, 1 May 2023 12:56:37 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id A84A6407E2 for <linux-mm@kvack.org>; Mon, 1 May 2023 16:56:37 +0000 (UTC) X-FDA: 80742290034.24.D0A6A9E Received: from mail-pf1-f202.google.com (mail-pf1-f202.google.com [209.85.210.202]) by imf07.hostedemail.com (Postfix) with ESMTP id E034B40020 for <linux-mm@kvack.org>; Mon, 1 May 2023 16:56:35 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=google.com header.s=20221208 header.b=cL9ulyr1; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf07.hostedemail.com: domain of 3Qu9PZAYKCIk574r0ot11tyr.p1zyv07A-zzx8npx.14t@flex--surenb.bounces.google.com designates 209.85.210.202 as permitted sender) smtp.mailfrom=3Qu9PZAYKCIk574r0ot11tyr.p1zyv07A-zzx8npx.14t@flex--surenb.bounces.google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1682960195; 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=uHz3gIMQ14LMAlJH3BHlupoStZ8/+BrUL09pT+1nDVs=; b=OB5DElKjTxGCmWUdW3b3y4PcZ48pY2Aflfq7C9v9HOhVmjymMBG+NLdz18d19aaRL3J1re mN2DcsCkUSqOajO8jvnuP3IeEbab9yFBNPtgx5FS/mSaFZK4mO6nZnmEFrX3gEfEphut+C NLxB9rlUgNgqMAEzD5u7byOKUHr1sFw= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=google.com header.s=20221208 header.b=cL9ulyr1; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf07.hostedemail.com: domain of 3Qu9PZAYKCIk574r0ot11tyr.p1zyv07A-zzx8npx.14t@flex--surenb.bounces.google.com designates 209.85.210.202 as permitted sender) smtp.mailfrom=3Qu9PZAYKCIk574r0ot11tyr.p1zyv07A-zzx8npx.14t@flex--surenb.bounces.google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1682960195; a=rsa-sha256; cv=none; b=rK8KNEiULg39M/u7lWuT/qJW/qxqjL/9m30SLyPcDDOhfGqbTEvUDl36gDn/0leMMQvkI9 fmU/L8GNPoN2sUBorfHt9L/S6HcMfrvY6VN8SIKR2+avrh6QKy+kGiBQyn+Uu14Si8X7J6 BhIXPiAPF9opT1PI3tA1RAygVMaFayc= Received: by mail-pf1-f202.google.com with SMTP id d2e1a72fcca58-64115ef7234so23372363b3a.1 for <linux-mm@kvack.org>; Mon, 01 May 2023 09:56:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1682960195; x=1685552195; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=uHz3gIMQ14LMAlJH3BHlupoStZ8/+BrUL09pT+1nDVs=; b=cL9ulyr1TZmloHcY9ZAQt2916/Hy8kFnLfCTiFsQOyXG21mKZDk2kVsVGS3swW/o9A lmsPI4V+ni8bJ2cDmSOvMhTe7jiZncm+a+dX+h32N0c6xUNbGxEO59xGx2raskwk+yE+ EY40N2q/B5lxnqf+wqKkKUxKcIxmFMWDeQ/MPMZ5UoklVL3SBusyJB6cuGrGjrAev2jt I6daIpOCKx+oNZEO+zjvrtYAnmo4PPKmPdsrXndRo+l1Ieu4A+pt+fjUYtVugs+1Ncqh keNiqCygIJKFaCxV1denDbSpt/uk9T3I2i0PdEP0vYROV8UgAo/d+Ogm15HjT6dg+WeL DFBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682960195; x=1685552195; 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=uHz3gIMQ14LMAlJH3BHlupoStZ8/+BrUL09pT+1nDVs=; b=ITvPf/KAmMU19k2yCrRW0I7StE/p2NgXnFhG9B4BtSaMbxvnWiFUQschKq7uTYHu51 Omcspg5kWXRsfU8o8RrDjdczoc+58kEjYfwzNMQ7EactvK1j8DcF20c8SzhWN1Hkt5Db JhSQworfJHiffY34ITq7KytFIOUkk48oHsEpykKdqwBWNcS7yILWq2YMJDWVuX4KZP3M y5OTS/bcDwKzxnDwa0jrFYSAZYvhpDBHCTKpltYj7XwFgqkZi2vvFWuP1AEsjEeyDbfH r0H97NIB60yMxY4vMXIMhiHVUy/JcwV717/99lrr1XeNVL6l29dSf/q3HzV9GRLZppfV ijDA== X-Gm-Message-State: AC+VfDxMAoDgm2y0KjBtbZNDhP26Sq/e8x2pj+GQHaeaAZeQGErPk3Rj 65NnWc9NQa8a9zQ3ErEbhAHeTgG7VBA= X-Google-Smtp-Source: ACHHUZ7qtjt6xJv0/W6KanE/G1kJWq4JffXkn4YmB84VAxkpL2X6o57PZ5XdLwRiQeUXxZyrcuCDjEjhXCs= X-Received: from surenb-desktop.mtv.corp.google.com ([2620:15c:211:201:6d24:3efd:facc:7ac4]) (user=surenb job=sendgmr) by 2002:a17:90a:5105:b0:244:9620:c114 with SMTP id t5-20020a17090a510500b002449620c114mr3673305pjh.1.1682960194723; Mon, 01 May 2023 09:56:34 -0700 (PDT) Date: Mon, 1 May 2023 09:54:48 -0700 In-Reply-To: <20230501165450.15352-1-surenb@google.com> Mime-Version: 1.0 References: <20230501165450.15352-1-surenb@google.com> X-Mailer: git-send-email 2.40.1.495.gc816e09b53d-goog Message-ID: <20230501165450.15352-39-surenb@google.com> Subject: [PATCH 38/40] codetag: debug: mark codetags for reserved pages as empty 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, corbet@lwn.net, void@manifault.com, peterz@infradead.org, juri.lelli@redhat.com, ldufour@linux.ibm.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, 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, 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: rspam02 X-Rspamd-Queue-Id: E034B40020 X-Stat-Signature: knz3s67gisi9of945ism87yw8or631i5 X-HE-Tag: 1682960195-30836 X-HE-Meta: U2FsdGVkX1+XvmSvS8fpqdiUo9K+pFJSpy/1BuetmdpBXV20WIaJk+XSecsMVc6TK//qaTmufV+K3fWJX31fLsgp8u1/zQs8UvoCJLlkacOiRd9FvQGPkn+RzNKV9seswho8VeA673dUReScMBbDwXie416+ZVLl8wBsh6043eL4WGPPnloco6Be5TD+cilcuwa83IiV8BFsCBFxaDCe1dbB9+nc33LNw4O3hMM+a7yEezWqlTurO7LzhsFICTg92Lwpy5q3F6Eqspgmk9i43Otu9uB3elCzeY3E2UQwqWX3jc383o7KzMN2LTDVxbQzsYHmSl9v52E2FF0QriDVr1FWE+DIZjMOWIwJ8iYPgDRq+QtGNQes44SjQxzzFZcfB2ly8qc4DftPz/L93og9wZGhcP8XSZNygljfvbixK2EoWi9gxb2lbdtRiefb7CLynznZPsHVAe3tEPx60TGpzXjEUrdAwP+XpFJAFS/TWBao/VYTNFEEH+fzBmRPnramKi6mTw2Km/3cKD5SxbB8b8L2dBRU/xXINEi3BJsnqnrFjsnNc6vUA+KUdcSK72Tn+vlVdAlm98qlQUYryVmarSShCAzjtQzcmhrNZH75wwO2/oXWtYOPKwF0feBSb/ld6HdxiAlHwsTDF5DY4fEz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ests=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> |
Series |
Memory allocation profiling
|
expand
|
diff --git a/include/linux/mm.h b/include/linux/mm.h index 27ce77080c79..f5969cb85879 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -5,6 +5,7 @@ #include <linux/errno.h> #include <linux/mmdebug.h> #include <linux/gfp.h> +#include <linux/pgalloc_tag.h> #include <linux/bug.h> #include <linux/list.h> #include <linux/mmzone.h> @@ -2920,6 +2921,13 @@ extern void reserve_bootmem_region(phys_addr_t start, phys_addr_t end); /* Free the reserved page into the buddy system, so it gets managed. */ static inline void free_reserved_page(struct page *page) { + union codetag_ref *ref; + + ref = get_page_tag_ref(page); + if (ref) { + set_codetag_empty(ref); + put_page_tag_ref(ref); + } ClearPageReserved(page); init_page_count(page); __free_page(page);
To avoid debug warnings while freeing reserved pages which were not allocated with usual allocators, mark their codetags as empty before freeing. Maybe we can annotate reserved pages correctly and avoid this? Signed-off-by: Suren Baghdasaryan <surenb@google.com> --- include/linux/mm.h | 8 ++++++++ 1 file changed, 8 insertions(+)