From patchwork Tue Jul 18 02:29:33 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: 13316683 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 EBC26EB64DC for ; Tue, 18 Jul 2023 02:31:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8AF718D0005; Mon, 17 Jul 2023 22:31:14 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 85FFF6B007E; Mon, 17 Jul 2023 22:31:14 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 700A18D0005; Mon, 17 Jul 2023 22:31:14 -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 61EE16B007D for ; Mon, 17 Jul 2023 22:31:14 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 35C00805BF for ; Tue, 18 Jul 2023 02:31:14 +0000 (UTC) X-FDA: 81023155668.12.03C69CA Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by imf08.hostedemail.com (Postfix) with ESMTP id D58A1160002 for ; Tue, 18 Jul 2023 02:31:11 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=koVSyh8T; spf=pass (imf08.hostedemail.com: domain of aneesh.kumar@linux.ibm.com designates 148.163.156.1 as permitted sender) smtp.mailfrom=aneesh.kumar@linux.ibm.com; dmarc=pass (policy=none) header.from=ibm.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1689647472; a=rsa-sha256; cv=none; b=rUG/KpCDkvmK1uEcpRLRaTYdOSK2uRDGuQDOQPRivAE/AWUkIJMyo3GeitcHSyuhKpx3xt cmwf1j3y7n5ed4ih+hcw/2Dle8A1ZjbZ7s8D/Gq0bcQWRgzGhUuLvPNF+sP4uB8kYN/HGW 6bRr5bYEiNR3Cd7vjpsu82LLpuCXpEQ= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=koVSyh8T; spf=pass (imf08.hostedemail.com: domain of aneesh.kumar@linux.ibm.com designates 148.163.156.1 as permitted sender) smtp.mailfrom=aneesh.kumar@linux.ibm.com; dmarc=pass (policy=none) header.from=ibm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1689647472; 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=XCQvO4AMwAl3UVUAgFYIr0Tyqbjq93TFj9IeImIxS/c=; b=uKx6aG6qeF/S/q/RjW/wF/FIR8qPTOre3VKqoGr0LflLF3+QH1qRhyYu8Ekx/nMqsUW+3n 8jV0Y4qv4f96z/zrHyV0DVqJTt0iW4c0OWAXuGfFKmy4v6QL0yuE7kyP1nxw3swu61hTyR 8dCZBSBpUaOW+vLV9SCpOU3kB+YO9Rc= Received: from pps.filterd (m0360083.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 36I22tdw028188; Tue, 18 Jul 2023 02:31:00 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=XCQvO4AMwAl3UVUAgFYIr0Tyqbjq93TFj9IeImIxS/c=; b=koVSyh8TTP4JpgNw+6IrFaNhVGR/n3nMNDCCKrhgqhuhCk5jR3WZYFRDF3g2RRUKTOK1 sxIBAxBCnKqvHC+qJ5P6e5ejalPquSFcot3kidgftuGoI8z9rw34nIrgGtRsQT0ne8dr 8Mkb0FApg+VsWIxbagdk3/BrCgeIykJ7u6L4zub7Ng4yY8Cs//j5LqwF3aMMvyaEn6j/ 8HdbtMH2nBlEnmGyBTinMu1OShhkXw5uFGOrKMh16lotjRUw8vwfX2CWrBotOFTVudbL SEhy+WDNUbufjGpa7oXv5ZvnqeN66eDjCZ3l5nHYgxS9G6YLS8lt3zG0azl9DPM7hqSm yg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3rwhksgmmf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 18 Jul 2023 02:31:00 +0000 Received: from m0360083.ppops.net (m0360083.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 36I2PZ9p004618; Tue, 18 Jul 2023 02:30:59 GMT Received: from ppma12.dal12v.mail.ibm.com (dc.9e.1632.ip4.static.sl-reverse.com [50.22.158.220]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3rwhksgmm3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 18 Jul 2023 02:30:59 +0000 Received: from pps.filterd (ppma12.dal12v.mail.ibm.com [127.0.0.1]) by ppma12.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 36HMo58M016880; Tue, 18 Jul 2023 02:30:58 GMT Received: from smtprelay03.wdc07v.mail.ibm.com ([172.16.1.70]) by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 3rv5srmrdm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 18 Jul 2023 02:30:58 +0000 Received: from smtpav01.dal12v.mail.ibm.com (smtpav01.dal12v.mail.ibm.com [10.241.53.100]) by smtprelay03.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 36I2UvRI55312664 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 18 Jul 2023 02:30:58 GMT Received: from smtpav01.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AA40158057; Tue, 18 Jul 2023 02:30:57 +0000 (GMT) Received: from smtpav01.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A6D2F58064; Tue, 18 Jul 2023 02:30:52 +0000 (GMT) Received: from skywalker.ibmuc.com (unknown [9.43.62.199]) by smtpav01.dal12v.mail.ibm.com (Postfix) with ESMTP; Tue, 18 Jul 2023 02:30:52 +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 v5 13/13] powerpc/book3s64/radix: Add debug message to give more details of vmemmap allocation Date: Tue, 18 Jul 2023 07:59:33 +0530 Message-ID: <20230718022934.90447-14-aneesh.kumar@linux.ibm.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230718022934.90447-1-aneesh.kumar@linux.ibm.com> References: <20230718022934.90447-1-aneesh.kumar@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: THKORosA-E6gq1GbH_AJ8roPk4CkfDLz X-Proofpoint-ORIG-GUID: N271qjflk5lA9Iab8e12PGo5M26ghhsz 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-17_15,2023-07-13_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 spamscore=0 suspectscore=0 clxscore=1015 mlxlogscore=999 malwarescore=0 priorityscore=1501 adultscore=0 impostorscore=0 phishscore=0 lowpriorityscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2306200000 definitions=main-2307180017 X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: D58A1160002 X-Stat-Signature: 9mx9pneoqons3fuu879amr61pgebjd4w X-Rspam-User: X-HE-Tag: 1689647471-1396 X-HE-Meta: U2FsdGVkX1/KThx/HQiYTW4vQkepHBKR/p9PqYVVIXoviLtfQm3K1phhM25wWUvuRip0JpBdVQm+7khOwAiMQqhsc0kzo8A/W4vuvbFWMO4Eleh+VUvH6W1oppDLer2R61P5bF5H0oUi0BBIO4tkObvI8bKvwIM1avnlGybNO0qAHtwnsF1HFrMtSsutqKqFYsdsfj4KvVVIrAiyroxwp0OoSqm7zrTfRZvlhFSv9qf3qsKj/AaEa/R4xEYJSZ/mWLm8ZY8l18piTogzZ6TxoXD4bpv+18g2E3jyT5/MHXOWL/5k97ru2PRiGhmIbtrLUJdzNpCW8owRH8lHU3+a1jNxhKqbFvJmpW76oNmRw06KihuBBW3r2/thHrEg2NuX0jGr7cOZ29iSRhbWAW+qHacP6yWEGI/D7gcuk8RevJCnnxiwBo8Yl/x6wj1UJlEzfxYef7Gzdh/heKwBd0X/KUiwrKA1wtF9UtToTqlhx45HVEGHeCCYCQJIpEjZz/ojv0pDgmzAe3npd5fWApZbmV1ucObImXsEeB48uUEpOf6ANh6fq7WZvij6xtSx03v1DDDv0gy1FOudPWvh51aoeFVrscdNVgcmY5B/S7S48q4qu76dYI2MBuIGdiKWDg0axUsFN2UcwE2fhhTQsGcBDzVbpgOFM8VcISi6QrkvOo7Q+Q+urFv2yuL2P6hBMvsUQrCrimbUEQSqMvcmwLBuVoO+/cLm2Ho58NrPb+Y8xJHP/Q/A+k2WudpBYg8P4mBGS0/+a2ok+UR0Gg92qZVM40HRndBn0nSjpQexnQ4FDCs7ZqPDcWCcHcRQSZjlET1UnsQtnH+VbeKjAUTMrAz0kYpgV9walEDoHlIQLFAUHeUmoJPnmlKsH1Vsx+gIFtcbysVj6sURi0Tqn07PViSUiKsr1oQ95YZX1K1kuP5cp6j6PrgbOOANciwmdt6SnzK7c5Ie20oqwzX8Z3r8Y50 WPrQTaIk ig+MWCpX7XbU1AA1FrT+CENmSyfvkqrszV++SJGRCTSPnBlTxOvA/mE9u+Exo6rptSmoCjW/JHIMQxvMJC2AiSzrApNiSyJMEfQ1sTK4R38XSOuW2ToDgzPLD2Yl8yZvh95qsCdIpMqF/03c3cKBmyDz/jcPz0sgXAAycyOhd3ZIR1yQdmGKdHPCWlXWNvlSD8FEJ/eh7Aww7qPVxVOqI9yPQNCuzBHnEhVfkIVJ//xu2ZQE= 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 73d0987369ff..2828e7e0802c 100644 --- a/arch/powerpc/mm/book3s64/radix_pgtable.c +++ b/arch/powerpc/mm/book3s64/radix_pgtable.c @@ -1034,6 +1034,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 @@ -1046,6 +1047,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)); @@ -1155,6 +1157,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) { /*