From patchwork Tue Jun 13 09:25:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kassey Li quic X-Patchwork-Id: 13278174 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 ABE35C88CB6 for ; Tue, 13 Jun 2023 09:25:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AF7BF8E0002; Tue, 13 Jun 2023 05:25:48 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A7FCB6B0075; Tue, 13 Jun 2023 05:25:48 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 920618E0002; Tue, 13 Jun 2023 05:25:48 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 7EEB16B0074 for ; Tue, 13 Jun 2023 05:25:48 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 2CF03140437 for ; Tue, 13 Jun 2023 09:25:48 +0000 (UTC) X-FDA: 80897192376.29.E8C1C09 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by imf09.hostedemail.com (Postfix) with ESMTP id 1B82C140006 for ; Tue, 13 Jun 2023 09:25:44 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=quicinc.com header.s=qcppdkim1 header.b="pcPXlQy/"; dmarc=pass (policy=none) header.from=quicinc.com; spf=pass (imf09.hostedemail.com: domain of yingangl@qualcomm.com designates 205.220.180.131 as permitted sender) smtp.mailfrom=yingangl@qualcomm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1686648345; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references:dkim-signature; bh=vYdncpcPO4FvW58HwL7LEjG2V6prrN7zDBN9KsJoPnE=; b=BjO/Gqq+aUBgd3LhK6vF6XmIm//X18S/MKXA3W2j+pRMQTCHRdhRNMK++QPMkMRa0KWv93 0/ONAQiBt2jSDL7TwOz/vmQfdM0Pzfo2iP9fsrAVo+bmCFWHOi/A5+DLkF/jBO6hnISqr2 kL0OCYynILXB/h0PaXO0O4rUlRA10d8= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=pass header.d=quicinc.com header.s=qcppdkim1 header.b="pcPXlQy/"; dmarc=pass (policy=none) header.from=quicinc.com; spf=pass (imf09.hostedemail.com: domain of yingangl@qualcomm.com designates 205.220.180.131 as permitted sender) smtp.mailfrom=yingangl@qualcomm.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1686648345; a=rsa-sha256; cv=none; b=lF8XAC+yapZDQWJUFySZOiuLMl2rTLEz0Bs0W00iZxHflyBwZzO/1rGrXXYNDB0N3f4OP9 6uTqQeYrKn4L/8og7goE+R0EqsiD9sqtFwuArPDqcQlSAKKNIf3UvdjMXsklzKrAVNCQ/e 8sAPLDkfzvEbBHaqLZaU+894CW4nG1w= Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 35D9C7K2012602; Tue, 13 Jun 2023 09:25:41 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id; s=qcppdkim1; bh=vYdncpcPO4FvW58HwL7LEjG2V6prrN7zDBN9KsJoPnE=; b=pcPXlQy/G2Hjp1Rtt7r3ZTiwnllnxGtnWqksKeJb5fFKJVbbnPWAymhnMQ8OcRDzXKT5 WRmvREoRaUMB0x+nu3kle6RKdrqutFF708pc51RzFTpZnSVmsy6liI8SElLb4d/IfF4m v0SNHOgyf46Bgg84IRrtDO7pU6Ee2/5AdUtR68gXT1x1DG7zFLK4LIXPfQahA9SpekkH 4sKoKBC+U/DBk9W+fIGwTHuHSMxrD0eNu3ceoH5gxuJou98JuLEh27L4chxLubtZeBia dha57FV8HNmymtOFh6IEBpdv9nSyH2dUngoxdkkm3FUjKmFo1+tbMEq7tvkBKHjzyCJ/ Bg== Received: from aptaippmta01.qualcomm.com (tpe-colo-wan-fw-bordernet.qualcomm.com [103.229.16.4]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3r6ng4r18h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 13 Jun 2023 09:25:41 +0000 Received: from pps.filterd (APTAIPPMTA01.qualcomm.com [127.0.0.1]) by APTAIPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 35D9PcUU019591; Tue, 13 Jun 2023 09:25:38 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APTAIPPMTA01.qualcomm.com (PPS) with ESMTP id 3r4j8kpmt4-1; Tue, 13 Jun 2023 09:25:38 +0000 Received: from APTAIPPMTA01.qualcomm.com (APTAIPPMTA01.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 35D9OFSW018425; Tue, 13 Jun 2023 09:25:38 GMT Received: from maow2-gv.ap.qualcomm.com (maow2-gv.qualcomm.com [10.232.193.133]) by APTAIPPMTA01.qualcomm.com (PPS) with ESMTP id 35D9PbvZ019584; Tue, 13 Jun 2023 09:25:38 +0000 Received: by maow2-gv.ap.qualcomm.com (Postfix, from userid 399080) id 8973C21000DC; Tue, 13 Jun 2023 17:25:36 +0800 (CST) From: Kassey Li To: akpm@linux-foundation.org, vbabka@kernel.org Cc: Kassey Li , minchan@kernel.org, vbabka@suse.cz, iamjoonsoo.kim@lge.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH] mm/page_owner/cma: show pfn in cma/page_onwer with hex format Date: Tue, 13 Jun 2023 17:25:33 +0800 Message-Id: <20230613092533.15449-1-quic_yingangl@quicinc.com> X-Mailer: git-send-email 2.17.1 X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: XsIjA2ZbUrhSb4_T029yCpUqvpTJePgp X-Proofpoint-ORIG-GUID: XsIjA2ZbUrhSb4_T029yCpUqvpTJePgp X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-06-13_04,2023-06-12_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1011 lowpriorityscore=0 mlxlogscore=767 phishscore=0 spamscore=0 impostorscore=0 malwarescore=0 bulkscore=0 adultscore=0 priorityscore=1501 mlxscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2306130082 X-Rspamd-Queue-Id: 1B82C140006 X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: c8o5fbjrfobmorhkoorhgx3z3m3kzoit X-HE-Tag: 1686648344-326691 X-HE-Meta: U2FsdGVkX18RpYQcVIPxtLo5dT7JG7jDDAtMnMC9vXsOQI/ypKsfr8xJelUM0Wn1dwDC24V3jUyp4Rkaa6QVesCJVy9NMV3Y7S6zDQO8l5DFSbSOkOihDbUdJr8k4sxV6TgPm2aDmNToNr+6OndfbCKtmsdlsl0v5JbW8KTaM4+mjnEc3rscbDRuN1bSEqU/RQP447ujHrBL10XQqn8P2g1cHM7FeLAkgo+NLS7j66pK96m2TPhK9ogdwHSvDM9GOL/nMuaFRRyz4Bltjcrv8uUAXxnS8AJK7XN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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: pfn is more easy to read in CMA log, against with page_onwer show in the same hex format. Signed-off-by: Kassey Li --- mm/cma.c | 4 ++-- mm/page_owner.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/cma.c b/mm/cma.c index 6268d6620254..a4cfe995e11e 100644 --- a/mm/cma.c +++ b/mm/cma.c @@ -483,8 +483,8 @@ struct page *cma_alloc(struct cma *cma, unsigned long count, if (ret != -EBUSY) break; - pr_debug("%s(): memory range at %p is busy, retrying\n", - __func__, pfn_to_page(pfn)); + pr_debug("%s(): memory range at pfn 0x%lx %p is busy, retrying\n", + __func__, pfn, pfn_to_page(pfn)); trace_cma_alloc_busy_retry(cma->name, pfn, pfn_to_page(pfn), count, align); diff --git a/mm/page_owner.c b/mm/page_owner.c index 31169b3e7f06..c93baef0148f 100644 --- a/mm/page_owner.c +++ b/mm/page_owner.c @@ -418,7 +418,7 @@ print_page_owner(char __user *buf, size_t count, unsigned long pfn, pageblock_mt = get_pageblock_migratetype(page); page_mt = gfp_migratetype(page_owner->gfp_mask); ret += scnprintf(kbuf + ret, count - ret, - "PFN %lu type %s Block %lu type %s Flags %pGp\n", + "PFN 0x%lx type %s Block %lu type %s Flags %pGp\n", pfn, migratetype_names[page_mt], pfn >> pageblock_order,