From patchwork Thu Jul 6 08:58:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Aneesh Kumar K.V" X-Patchwork-Id: 13303386 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 922D8EB64DC for ; Thu, 6 Jul 2023 08:59:57 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 299728E0003; Thu, 6 Jul 2023 04:59:57 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 248E68D0001; Thu, 6 Jul 2023 04:59:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1390A8E0003; Thu, 6 Jul 2023 04:59:57 -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 06A168D0001 for ; Thu, 6 Jul 2023 04:59:57 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id BBD521404AA for ; Thu, 6 Jul 2023 08:59:56 +0000 (UTC) X-FDA: 80980589592.17.BA0F89F Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by imf25.hostedemail.com (Postfix) with ESMTP id 3F061A0011 for ; Thu, 6 Jul 2023 08:59:54 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=eYMJZPLf; dmarc=pass (policy=none) header.from=ibm.com; spf=pass (imf25.hostedemail.com: domain of aneesh.kumar@linux.ibm.com designates 148.163.156.1 as permitted sender) smtp.mailfrom=aneesh.kumar@linux.ibm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1688633994; 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-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=R5o3btXCmicCo4Tpp9Fg5DPacjE5pAaul14OJ0FkTj4=; b=dlj8GbkoRPxNDbL9Tg2HcNJ6mDRIWH+lqozF0OJca/9Wx4f8GKjNprmeZUDNzGyuxAwsdr QW4wxN/hrf/8BTlm+Hy045jjZ+njjomu0Hv4MaiEGRB3yA1PuptT+l+E77wpL1FDbQJ50v UqLmxCyNwpnqpGv0u+efC8URzg4xR9k= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=eYMJZPLf; dmarc=pass (policy=none) header.from=ibm.com; spf=pass (imf25.hostedemail.com: domain of aneesh.kumar@linux.ibm.com designates 148.163.156.1 as permitted sender) smtp.mailfrom=aneesh.kumar@linux.ibm.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1688633994; a=rsa-sha256; cv=none; b=7YUIMnyP0iChq9AifZtmeROOD833uv+gEPqMx68f8w0fJauaAQuZDBiqOMQEVa6BLYEHWe TNp+VdsSC3ZdjffmkfLTY3mggUzFFh2n+Jsft5K6jrc/1qEV4c1NsoeST7b9+OnEeWIZoN S/DEvgkYW80fLs8n9bo1Siy25QJhaMU= Received: from pps.filterd (m0353729.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3668kiT6018556; Thu, 6 Jul 2023 08:59:42 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=R5o3btXCmicCo4Tpp9Fg5DPacjE5pAaul14OJ0FkTj4=; b=eYMJZPLfHRMVxuwwIVyJRH/HOGVBuorO1HApiaeoNPPC63EiOICXwXIdSOKBGRWNFw9b DUhcRyK086xjQE+RTADaSqoWU3E5EShySGXIjnf33wv/XIfeMBEUtsx71AvkOWfeauMQ 80yC46K+o8CuBBcgRxBx7Fh/H/psaNiq+7Ajc6f8j37rsPAj1xvCZajDF3663wWpIIlt oR5VJnvF3+UNcruP/ev0ST7g58XmpKdB4aGsNLSkfaCv0NBVEGgd56d4UvvsjQlBY2MA SvZpkgTKnitU0zonHyDZ9NB7lsg0k6WBDNTzT3ZjfGMPJyZgxqVPNw9AvCYU8pIuv1bc 8Q== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3rntd80bt3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 06 Jul 2023 08:59:42 +0000 Received: from m0353729.ppops.net (m0353729.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3668koB8018858; Thu, 6 Jul 2023 08:59:41 GMT Received: from ppma02wdc.us.ibm.com (aa.5b.37a9.ip4.static.sl-reverse.com [169.55.91.170]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3rntd80bsg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 06 Jul 2023 08:59:41 +0000 Received: from pps.filterd (ppma02wdc.us.ibm.com [127.0.0.1]) by ppma02wdc.us.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 3667oaNX014939; Thu, 6 Jul 2023 08:59:40 GMT Received: from smtprelay05.dal12v.mail.ibm.com ([9.208.130.101]) by ppma02wdc.us.ibm.com (PPS) with ESMTPS id 3rjbs67x4a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 06 Jul 2023 08:59:40 +0000 Received: from smtpav01.dal12v.mail.ibm.com (smtpav01.dal12v.mail.ibm.com [10.241.53.100]) by smtprelay05.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 3668xdLG1376944 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 6 Jul 2023 08:59:39 GMT Received: from smtpav01.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B8FF858062; Thu, 6 Jul 2023 08:59:39 +0000 (GMT) Received: from smtpav01.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E419458059; Thu, 6 Jul 2023 08:59:34 +0000 (GMT) Received: from skywalker.in.ibm.com (unknown [9.109.212.144]) by smtpav01.dal12v.mail.ibm.com (Postfix) with ESMTP; Thu, 6 Jul 2023 08:59:34 +0000 (GMT) From: "Aneesh Kumar K.V" To: linux-mm@kvack.org, akpm@linux-foundation.org, mpe@ellerman.id.au, linuxppc-dev@lists.ozlabs.org, npiggin@gmail.com, christophe.leroy@csgroup.eu Cc: Oscar Salvador , Mike Kravetz , Dan Williams , Joao Martins , Catalin Marinas , Muchun Song , Will Deacon , "Aneesh Kumar K.V" Subject: [PATCH v3 13/13] powerpc/book3s64/radix: Add debug message to give more details of vmemmap allocation Date: Thu, 6 Jul 2023 14:28:19 +0530 Message-ID: <20230706085819.827761-14-aneesh.kumar@linux.ibm.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230706085819.827761-1-aneesh.kumar@linux.ibm.com> References: <20230706085819.827761-1-aneesh.kumar@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: ZEf-ItYJYP9ALjhsQNJsxs1vuqIAM4_N X-Proofpoint-ORIG-GUID: Z7SWV4WQcHepAh7_Kbdsv69gkpfSrNsp X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-06_05,2023-07-06_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 clxscore=1015 malwarescore=0 suspectscore=0 adultscore=0 spamscore=0 bulkscore=0 impostorscore=0 mlxscore=0 priorityscore=1501 mlxlogscore=999 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2307060075 X-Rspamd-Queue-Id: 3F061A0011 X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: hwsrs4maztpyqp1azom67cpqrygjr3wj X-HE-Tag: 1688633994-413296 X-HE-Meta: U2FsdGVkX1+iyBj4m9bdINzt2aawpOdUjK9QfZ09e+tk2X+c2eNDYX4XnLHaGLABNqvg3pPE/PimUAsDcSzNCSkd24mvkYd7+nozoyhYWWrCqqjO5aoHQONKkLEBxKZNuCGK0R/fMJZRX3S0s0Inb21bp6Cs+FW59TVq8q1ldaIlniEpoT36AUCwjbXWghMf7k2kTJbCXZOH+gXT/pNxm/GNSb93vqvzQIP/ICkdiD7voH5kMf1BObADgqjAk41pvMk95sN49N+fhQdB0LJEUYYW3KpSjwPY9W5NZOsNnnVr1WlXmwTeTWl1LeyXwLivBZ2sPNIq65CCaIJ+yBL3Ms9FPSgR//R089Q9+ikGV7xbGL9D5CIUfcF/RkFUtKGiQmLAl+rfGHVPLozNm+cs9JthrsDQDe9zqVRirBz6zFRqtm5hFwWcflJMM9O32yWDeSJC/6ji8tKm01qadLRW6i0xQU2sB06RRVcJB5NIda36WSQbw9RlSvmHDg56ScNuETxpKjy7QDt3XsYjL84jm57bmdi9S7mBV2j1CNmwbkh5n5iOFxaSH0KeCZtcOKDaglDXeWqe1JvDxqe1nFziwyY+IuCSX41/sOo6yWiyD1i9cuiD1zIOH34o0YroJtBSRgcSlygBQnSxNLwbwxyj6FtuB4QEkQFYh8wLnFDod6y44zieHKuS58LzLX+HI4AlX6GxR8lQjRKSosb7fkgp/y9mWiVr+zek7B09SmjR4iJAvQ93ZxOQAJylx8uwhncRFXM2C45Yv5mdbntHfoMH73f4BroggZ76ikx7QQ1U5c2uOKl8ZAss3fxFQPQjbLf8ruTmU2JFo9YNtYo1PZv9ARwAoDIlnlkUgCgkUmhKquwOwvO4qsYXpsCwQLzpAvndGNZHUetyi/aLFEqkN1LKcss9gxPjKywetRxtwP7zGMslR5a/oIxvnrFTPOdD7rfayM31Lg6mFtFEFUFO3fz OBR4MELS IACSgACV2drB4OsEbLcfy9ObojMUeAAO4OHLT0Cbe/EO1gte73qLqr0yGUpvf4GU2F9HLls/2Yi+4t6VcYHbwEF6sO2XUeU07Ubpvlj6F4crZ9TnjxLBm6UeKtkTkafBXDKu2MQ21gFYI2U08HjWCmxBbXLOeQo/U4Xc2VSU7HMl4+C+SR8aXhbbb6F1/64iY93DnZJEQW3DLoCoIvIJkMPESHukG2kmmHdn5L0K7JQnw+tE= 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: Add some extra vmemmap pr_debug message that will indicate the type of vmemmap allocations. For ex: with DAX vmemmap optimization we can find the below details: [ 187.166580] radix-mmu: PAGE_SIZE vmemmap mapping [ 187.166587] radix-mmu: PAGE_SIZE vmemmap mapping [ 187.166591] radix-mmu: Tail page reuse vmemmap mapping [ 187.166594] radix-mmu: Tail page reuse vmemmap mapping [ 187.166598] radix-mmu: Tail page reuse vmemmap mapping [ 187.166601] radix-mmu: Tail page reuse vmemmap mapping [ 187.166604] radix-mmu: Tail page reuse vmemmap mapping [ 187.166608] radix-mmu: Tail page reuse vmemmap mapping [ 187.166611] radix-mmu: Tail page reuse vmemmap mapping [ 187.166614] radix-mmu: Tail page reuse vmemmap mapping [ 187.166617] radix-mmu: Tail page reuse vmemmap mapping [ 187.166620] radix-mmu: Tail page reuse vmemmap mapping [ 187.166623] radix-mmu: Tail page reuse vmemmap mapping [ 187.166626] radix-mmu: Tail page reuse vmemmap mapping [ 187.166629] radix-mmu: Tail page reuse vmemmap mapping [ 187.166632] radix-mmu: Tail page reuse vmemmap mapping And without vmemmap optimization [ 293.549931] radix-mmu: PMD_SIZE vmemmap mapping [ 293.549984] radix-mmu: PMD_SIZE vmemmap mapping [ 293.550032] radix-mmu: PMD_SIZE vmemmap mapping [ 293.550076] radix-mmu: PMD_SIZE vmemmap mapping [ 293.550117] radix-mmu: PMD_SIZE vmemmap mapping Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/book3s64/radix_pgtable.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/powerpc/mm/book3s64/radix_pgtable.c b/arch/powerpc/mm/book3s64/radix_pgtable.c index dac56c883099..a62729f70f2a 100644 --- a/arch/powerpc/mm/book3s64/radix_pgtable.c +++ b/arch/powerpc/mm/book3s64/radix_pgtable.c @@ -1026,6 +1026,7 @@ static pte_t * __meminit radix__vmemmap_pte_populate(pmd_t *pmdp, unsigned long p = vmemmap_alloc_block_buf(PAGE_SIZE, node, NULL); if (!p) return NULL; + pr_debug("PAGE_SIZE vmemmap mapping\n"); } else { /* * When a PTE/PMD entry is freed from the init_mm @@ -1038,6 +1039,7 @@ static pte_t * __meminit radix__vmemmap_pte_populate(pmd_t *pmdp, unsigned long */ get_page(reuse); p = page_to_virt(reuse); + pr_debug("Tail page reuse vmemmap mapping\n"); } VM_BUG_ON(!PAGE_ALIGNED(addr)); @@ -1147,6 +1149,7 @@ int __meminit radix__vmemmap_populate(unsigned long start, unsigned long end, in p = vmemmap_alloc_block_buf(PMD_SIZE, node, altmap); if (p) { vmemmap_set_pmd(pmd, p, node, addr, next); + pr_debug("PMD_SIZE vmemmap mapping\n"); continue; } else if (altmap) { /*