From patchwork Wed Jul 17 01:16:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suren Baghdasaryan X-Patchwork-Id: 13735018 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 EFE85C3DA59 for ; Wed, 17 Jul 2024 01:16:39 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 100526B0089; Tue, 16 Jul 2024 21:16:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0B1046B008C; Tue, 16 Jul 2024 21:16:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EB9C36B0092; Tue, 16 Jul 2024 21:16:38 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id CE0526B0089 for ; Tue, 16 Jul 2024 21:16:38 -0400 (EDT) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 48B2FA0869 for ; Wed, 17 Jul 2024 01:16:38 +0000 (UTC) X-FDA: 82347479676.30.E7CE86C Received: from mail-yw1-f202.google.com (mail-yw1-f202.google.com [209.85.128.202]) by imf29.hostedemail.com (Postfix) with ESMTP id A221712000C for ; Wed, 17 Jul 2024 01:16:35 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=GbsFw2M+; spf=pass (imf29.hostedemail.com: domain of 3chuXZgYKCEEvxuhqejrrjoh.frpolqx0-ppnydfn.ruj@flex--surenb.bounces.google.com designates 209.85.128.202 as permitted sender) smtp.mailfrom=3chuXZgYKCEEvxuhqejrrjoh.frpolqx0-ppnydfn.ruj@flex--surenb.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1721178975; a=rsa-sha256; cv=none; b=5Sl6hISko7V4gTh05LOsGgJlTVW32ofzNBFtRw55MblzKKgJM3eSZx+2h4gtaS6mAXa51u BiyC+Of9/8CLiluMRkOjDPc25DhHXOw0C+u0zSJa0giHzzl5eQ/24wfDmBzNLHNbESAYEM IUvWIgjt0Zd0j9pc6azwnfqE46rszSk= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=GbsFw2M+; spf=pass (imf29.hostedemail.com: domain of 3chuXZgYKCEEvxuhqejrrjoh.frpolqx0-ppnydfn.ruj@flex--surenb.bounces.google.com designates 209.85.128.202 as permitted sender) smtp.mailfrom=3chuXZgYKCEEvxuhqejrrjoh.frpolqx0-ppnydfn.ruj@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=1721178975; 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: references:dkim-signature; bh=ZtrRmPuJ7RM5N+fdBtCHcqUiCGG1Rz876hQyLiOH5uA=; b=XzCJWfeLXp/l/iJoVs/avUs7/bzKuCN6Nwqu12TfV2fbSYo8Fa7VwKHUb52v4Y0NXP/9sg u+KlJ5xhD2BIaL1FGkxXPii7dkoGJAw5DwRDJGOf4GmXZlAti5jy33DMS2KYgfaPLaStlO pxRz42ASgmoAZg2kwPzaSYNmV/G54Eo= Received: by mail-yw1-f202.google.com with SMTP id 00721157ae682-65b985bb059so123168067b3.2 for ; Tue, 16 Jul 2024 18:16:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1721178995; x=1721783795; darn=kvack.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=ZtrRmPuJ7RM5N+fdBtCHcqUiCGG1Rz876hQyLiOH5uA=; b=GbsFw2M+FR+PsN3CWFO6xGjeTMjJslVaUOMk2+jm6jfAdBAoMlQmE6BithsVyWLSDR KyhPuqgYJdMsg556EIS61pSNXpjAjWMpgDCDmseU/oSlS6lerDAE7YY6qEvUiGryFr45 3biBeHkuY6pR8dG4x2Iq94X0hCIAEBlYH2qmhujJFekvI5b5c+o8W4hEYQe52E1TcrW9 +Cl4kBuUMvgHa9u8YJAIUstBU586Q4+I3Z0+9COqcEo3mIWhg1yS3NFaMIvQEanQzUrp azK6uIUqkRIe2p8O/vOiBoMvivgmZaRGI/tkaT4M9WHP/ydw5P3T1crGDgsEYixQiH8l c/Fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721178995; x=1721783795; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=ZtrRmPuJ7RM5N+fdBtCHcqUiCGG1Rz876hQyLiOH5uA=; b=DFxHUT6N3T/jSi1ZqvmVKdMzqsHRScPheKhweSBiyVaZiVHx0JuWBB7J1H/1CQKTOC g6KE8vAYvl0k/fxZgHESDQ3IbIIfK6sPpZqjW3hgNs07UEdZN7li1xW9jGvGZ7deDgsS hO2yZzjf3Y+4eTqgtadc3jFo71Xw29rQIxkQgNsnXotbWoKorIE7dERiwic1AxhbkXxI bDWOjhmVvjAoW5ALZnZO4Yjiq4XDlklVGRCd3ULk/5ny83fSOO3fNVLUopbMRHjTESlo x7LQW3YedjSGACaqUcRp08GLg2HOO5u/crg77MgCTic6Y4sFbHivTP4nxywePRpJ/rca nR9Q== X-Forwarded-Encrypted: i=1; AJvYcCXloozt1/fSAf6LxuU70PynbR2dbj0CwLAinKJ5V+PZQzCOFwtbe58KrQhvpYbZvALpLVCcp3eUgEf8szi1Vr2HHCA= X-Gm-Message-State: AOJu0Yz2V+LC1AoN38v40ArgnPu29N2i8CFdkyyFXZ7oRKe1CVhIRsbs PpvLm/YkyxVWkFAjs9IXAiF4LjKhWibXSgBvOur5HteuWKfs0XbbMnQettP+bp17wDaH9kkTIjO jwg== X-Google-Smtp-Source: AGHT+IHTFNVrUuio+0uJd4nBOImnRm7IfFbCs/D9PnfF9NdGaQRDzAThxxkd1t68PzDM1tR8DwO1gU2sT2Y= X-Received: from surenb-desktop.mtv.corp.google.com ([2620:15c:211:201:9b4f:4efc:3f93:ed78]) (user=surenb job=sendgmr) by 2002:a05:690c:2fc5:b0:62d:fbf:920a with SMTP id 00721157ae682-665015e57ecmr106577b3.10.1721178994558; Tue, 16 Jul 2024 18:16:34 -0700 (PDT) Date: Tue, 16 Jul 2024 18:16:29 -0700 Mime-Version: 1.0 X-Mailer: git-send-email 2.45.2.993.g49e7a77208-goog Message-ID: <20240717011631.2150066-1-surenb@google.com> Subject: [PATCH 1/2] alloc_tag: export mem_alloc_profiling_key used by modules From: Suren Baghdasaryan To: akpm@linux-foundation.org Cc: kent.overstreet@linux.dev, hch@infradead.org, vbabka@suse.cz, pasha.tatashin@soleen.com, souravpanda@google.com, keescook@chromium.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, surenb@google.com, kernel test robot X-Stat-Signature: 5qm8yr1jweciuiart9byy558m8ucaxbg X-Rspamd-Queue-Id: A221712000C X-Rspam-User: X-Rspamd-Server: rspam10 X-HE-Tag: 1721178995-559911 X-HE-Meta: U2FsdGVkX1+VQ0XPBzykQ0DuAAD4a99iU6FWtURepVoOy5fydxiZqFq5Ef8+GLhITw9YVX4aQw1Xy7WQQHykDMzbtYFrIE2U845Iy66XOGC6J20mfV4ukoqSXagmEZItZII8LhCQgl0u/60bANtr8eiB+MdlK8Mm/yVz8toTPpEumO81eUk7s3Vksp9cvPyiXIPol24Rb6K9iac4tiNfB0nL1Lrf5NGhyMb+4lIK4NhnjWZWoTdoSAfcuS3052S5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oEzUx1kvyEWDuDSldV0s+aDt9+jNJ6sxwjV2lm29vSE9MTlIKxsjlvnRFcdzJxEvhPGOKDJy6Mud4KRhk6S8XPilckZZ7UBamD8c7rZIafTcghzc1TrltbAttlK5mEAfDv1OZvZagU6g9Jb86UjcWs6EvZeYAFM5eD2uU20myyM5AGEuY3d9Y9rtvsJxGXls3bkFHzTWVEgmHVMtHr1IVO+SiWiY7h2NPxvmB4D+G04N5yBT2UZ/rvBxyjW/DQzCfP7OGPtrlXUWIpK9mk8i0Dim7bSuStLNi8jbASMW5yyFAnIRx8wj4Xnk= X-Bogosity: Ham, tests=bogofilter, spamicity=0.027882, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Export mem_alloc_profiling_key as it is used by modules (indirectly via mem_alloc_profiling_enabled()). Fixes: 22d407b164ff ("lib: add allocation tagging support for memory allocation profiling") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202407080044.DWMC9N9I-lkp@intel.com/ Signed-off-by: Suren Baghdasaryan Acked-by: Vlastimil Babka --- lib/alloc_tag.c | 1 + 1 file changed, 1 insertion(+) base-commit: 0434dbe32053d07d658165be681505120c6b1abc diff --git a/lib/alloc_tag.c b/lib/alloc_tag.c index 81e5f9a70f22..832f79a32b3e 100644 --- a/lib/alloc_tag.c +++ b/lib/alloc_tag.c @@ -15,6 +15,7 @@ EXPORT_SYMBOL(_shared_alloc_tag); DEFINE_STATIC_KEY_MAYBE(CONFIG_MEM_ALLOC_PROFILING_ENABLED_BY_DEFAULT, mem_alloc_profiling_key); +EXPORT_SYMBOL(mem_alloc_profiling_key); struct allocinfo_private { struct codetag_iterator iter; From patchwork Wed Jul 17 01:16:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suren Baghdasaryan X-Patchwork-Id: 13735019 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 B1017C3DA49 for ; Wed, 17 Jul 2024 01:16:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3E7616B008C; Tue, 16 Jul 2024 21:16:40 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 321D06B0092; Tue, 16 Jul 2024 21:16:40 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 19B816B0095; Tue, 16 Jul 2024 21:16:40 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id ED8DC6B008C for ; Tue, 16 Jul 2024 21:16:39 -0400 (EDT) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 938CD1A07C3 for ; Wed, 17 Jul 2024 01:16:39 +0000 (UTC) X-FDA: 82347479718.30.990233A Received: from mail-yw1-f201.google.com (mail-yw1-f201.google.com [209.85.128.201]) by imf21.hostedemail.com (Postfix) with ESMTP id CD4AA1C000E for ; Wed, 17 Jul 2024 01:16:37 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=1RlOJKFR; spf=pass (imf21.hostedemail.com: domain of 3dBuXZgYKCEMxzwjsglttlqj.htrqnsz2-rrp0fhp.twl@flex--surenb.bounces.google.com designates 209.85.128.201 as permitted sender) smtp.mailfrom=3dBuXZgYKCEMxzwjsglttlqj.htrqnsz2-rrp0fhp.twl@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=1721178979; 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=WYs2NQlUzYrTkY7/jBEocDDb/Fk2gTcTv8X97Q6ft2U=; b=cTIvPXptlx8JA8ZhNK6Hq+3EH8VVn4yQU9m6b1CDUOlLLuetECNhtv/4jvGn1SotNwDRPy 5JhCbD3nFcnrLyFHQBjhjqBWt3mhfHJhvAfcz60Gfv85Amyr3HcJ6Lzj0PIM4sqZdXf9dR 5HhT6YsphrXvDSyin4uAMYFrSb3CQYE= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=1RlOJKFR; spf=pass (imf21.hostedemail.com: domain of 3dBuXZgYKCEMxzwjsglttlqj.htrqnsz2-rrp0fhp.twl@flex--surenb.bounces.google.com designates 209.85.128.201 as permitted sender) smtp.mailfrom=3dBuXZgYKCEMxzwjsglttlqj.htrqnsz2-rrp0fhp.twl@flex--surenb.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1721178979; a=rsa-sha256; cv=none; b=DKYznl2NjHPEgh/HC7JMsS+aNpuQgcLx2ZTcboMZO3xEI2rrSALQ/Cr4KtHzifUvarOqnN FaJv1Ghtl6Po+oB+rPl3GPUoScgrGZtM/7w18yf1CDEbPp86RgFz3K90moVWpykM+mtbU4 7gGbEdb0ZCz4IpT/uy0scytWwI1NsMg= Received: by mail-yw1-f201.google.com with SMTP id 00721157ae682-65e7c42f28dso123232327b3.2 for ; Tue, 16 Jul 2024 18:16:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1721178997; x=1721783797; 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=WYs2NQlUzYrTkY7/jBEocDDb/Fk2gTcTv8X97Q6ft2U=; b=1RlOJKFRXLEDH6DP2KWU92pd9YTMtEVbFWypR4zAaEM+PCTmSr9Ipu8VVoeu83ezKO 6/QKqbYPj6CJGOE33fInEmav+1bhZSoDFQc7g0uFvAgANAONmxOW6qFJwlVCxernRIOx 2KJ4JSm6A0sB2ceoIpngz0ebPbhlFt2d3kkOPlmS4iXihZxN/A41QkStyBXR38lJtYe0 dkE8l9/T13iFC7xF9KcvueGhRfkZOJiQUQY53lKYTxtZS58otK08V1o5xZ+81lX//nvJ 2w5IAKZZ5hiXZQFgWFtB7mq+3aOf8iRPRLfXaylmvzQTUiR0pUhGdgSsRZfG2y++dj0G zUeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721178997; x=1721783797; 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=WYs2NQlUzYrTkY7/jBEocDDb/Fk2gTcTv8X97Q6ft2U=; b=AmnXElIrOzoakhPu63N7quERKvoMD7h9ROKLRyQEKIxXo/4pbX1UmOVtIoKaTN+uu0 rPLjukkXaMpGg1BhtWqmOVMiR1JMOiMYD/TqEpXWoh/fBZEeDI1lQPiFAFnhZ7ywJZyp 7C8OOfzzmcVITM0VkHCo5k3038Q6XjnEw2tOGRPtoM6L/+nMa8+2pax0Kxi7GbaEPpVK NSL64MBPNR7VCkKMnSp5au6cGGagrpCi8PS8ToilPa0X1axtYKuiAH4sxHKZrQc2S6/Z zr1Vl3HhRMaetC2BxHAVLPbPgXX9oKymJse4wTxDfpgU1l/fe+Mhmiu9grfbuZG9yOzE TLZQ== X-Forwarded-Encrypted: i=1; AJvYcCWNj1IlvQ0UcCBV2CrODncdMZhsFmBdqJncfSAj5VUhakIsPoOUGA8d8+YM/b6l4Tab9uP0BuPoE7awnSGQK9oGBBs= X-Gm-Message-State: AOJu0YzEoUScL/dEtjekUJKa+DBRWB1rA17Cys285qJ2tVnEZPAEuKWf VaEmEWExlz+k0/9u6nnF4VLmYG2oRguTn4L255xvul2Am1r6iuW3WRYLe0DvAyfzQ/ucdhRU+cf /Sg== X-Google-Smtp-Source: AGHT+IG4pSDPzKKXsAL5A6p3APpsyei6VOH/oQKykr78n8RykTCZ1xTwjZZ801/bXu/vlGnVQoRe9PYRGjg= X-Received: from surenb-desktop.mtv.corp.google.com ([2620:15c:211:201:9b4f:4efc:3f93:ed78]) (user=surenb job=sendgmr) by 2002:a05:690c:19:b0:62f:22cd:7082 with SMTP id 00721157ae682-664ff8d9a69mr152627b3.5.1721178996997; Tue, 16 Jul 2024 18:16:36 -0700 (PDT) Date: Tue, 16 Jul 2024 18:16:30 -0700 In-Reply-To: <20240717011631.2150066-1-surenb@google.com> Mime-Version: 1.0 References: <20240717011631.2150066-1-surenb@google.com> X-Mailer: git-send-email 2.45.2.993.g49e7a77208-goog Message-ID: <20240717011631.2150066-2-surenb@google.com> Subject: [PATCH 2/2] alloc_tag: outline and export {get|put}_page_tag_ref() used by modules From: Suren Baghdasaryan To: akpm@linux-foundation.org Cc: kent.overstreet@linux.dev, hch@infradead.org, vbabka@suse.cz, pasha.tatashin@soleen.com, souravpanda@google.com, keescook@chromium.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, surenb@google.com, kernel test robot X-Rspam-User: X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: CD4AA1C000E X-Stat-Signature: 1dys36i91inh8uywuic6hjh35cqo334b X-HE-Tag: 1721178997-315695 X-HE-Meta: U2FsdGVkX19pWnrAJi1ahd5+5mryFddi/l8zuw0U8y9pucCFoKHG2M4sW1yQqjuhJnE3vqWmZfNydOnHYUEKIf6PU3CrT0gEjbnX0TI49ToHXdmfOIiEmcxQkTFDeXGL9uB/ugL/Gi5KtTX1HH6BUELtgTyvNLbwTBn4t0NWo8oUpUzQzAnFE6DmdmmPYURT/BjXEL/MbvIISDeo7Uc0ExMuD997WqzgGVtjepfvFy7QvXiWNBB+X0APTeKJFKAIfbCGjqrmgr4sECzA8W/cEL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wBMTAnkAr7AHJKjSTKDtrtqFLEA3pZg3ko3fL0zJ5Lnwc1pFrXlVt/AbGc7XMgApQpDXJXkTqvJg1sn8SyXVcn/kRDG9a0kgZ6JWIQQTeJEAvZjy5KvLMbm+hqSOD/bQSqI/Rl6XlmTDmn0n6A6uW2Eph2paieajkttUTH7yWUblO6KpDppX6XvKn1ZUyNLt6gFuuFG5fsumTQ37VJKEre3mlyRJa2OMOtuNfH1K0mPgAS6ATF/stY8d+LfVt5tv9n/aVkeqkQ60nSMrv1AQPpVIEzQ3MtdhSEVNc/KcQRzmIRvl41o5BE9ZZuHzT6TivFOpgymyo1hhuQzFBUGOgh2dWJrAA2qc2+9w= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000007, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Outline and export get_page_tag_ref() and put_page_tag_ref() so that modules can use them without exporting page_ext_get() and page_ext_put(). Fixes: dcfe378c81f7 ("lib: introduce support for page allocation tagging") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202407080044.DWMC9N9I-lkp@intel.com/ Suggested-by: Christoph Hellwig Signed-off-by: Suren Baghdasaryan Reviewed-by: Christoph Hellwig --- include/linux/pgalloc_tag.h | 23 +++-------------------- lib/alloc_tag.c | 23 +++++++++++++++++++++++ 2 files changed, 26 insertions(+), 20 deletions(-) diff --git a/include/linux/pgalloc_tag.h b/include/linux/pgalloc_tag.h index 9cacadbd61f8..3c6ab717bd57 100644 --- a/include/linux/pgalloc_tag.h +++ b/include/linux/pgalloc_tag.h @@ -13,6 +13,9 @@ extern struct page_ext_operations page_alloc_tagging_ops; +union codetag_ref *get_page_tag_ref(struct page *page); +void put_page_tag_ref(union codetag_ref *ref); + static inline union codetag_ref *codetag_ref_from_page_ext(struct page_ext *page_ext) { return (void *)page_ext + page_alloc_tagging_ops.offset; @@ -23,26 +26,6 @@ static inline struct page_ext *page_ext_from_codetag_ref(union codetag_ref *ref) return (void *)ref - page_alloc_tagging_ops.offset; } -/* Should be called only if mem_alloc_profiling_enabled() */ -static inline union codetag_ref *get_page_tag_ref(struct page *page) -{ - if (page) { - struct page_ext *page_ext = page_ext_get(page); - - if (page_ext) - return codetag_ref_from_page_ext(page_ext); - } - return NULL; -} - -static inline void put_page_tag_ref(union codetag_ref *ref) -{ - if (WARN_ON(!ref)) - return; - - page_ext_put(page_ext_from_codetag_ref(ref)); -} - static inline void pgalloc_tag_add(struct page *page, struct task_struct *task, unsigned int nr) { diff --git a/lib/alloc_tag.c b/lib/alloc_tag.c index 832f79a32b3e..5271cc070901 100644 --- a/lib/alloc_tag.c +++ b/lib/alloc_tag.c @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include @@ -22,6 +23,28 @@ struct allocinfo_private { bool print_header; }; +/* Should be called only if mem_alloc_profiling_enabled() */ +union codetag_ref *get_page_tag_ref(struct page *page) +{ + if (page) { + struct page_ext *page_ext = page_ext_get(page); + + if (page_ext) + return codetag_ref_from_page_ext(page_ext); + } + return NULL; +} +EXPORT_SYMBOL_GPL(get_page_tag_ref); + +void put_page_tag_ref(union codetag_ref *ref) +{ + if (WARN_ON(!ref)) + return; + + page_ext_put(page_ext_from_codetag_ref(ref)); +} +EXPORT_SYMBOL_GPL(put_page_tag_ref); + static void *allocinfo_start(struct seq_file *m, loff_t *pos) { struct allocinfo_private *priv;