From patchwork Tue Sep 24 10:15:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhijian Li (Fujitsu)" X-Patchwork-Id: 13810678 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 428F1CF9C71 for ; Tue, 24 Sep 2024 10:16:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9A4906B0085; Tue, 24 Sep 2024 06:16:07 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 953CA6B0088; Tue, 24 Sep 2024 06:16:07 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 81ADF6B0089; Tue, 24 Sep 2024 06:16:07 -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 63EAB6B0085 for ; Tue, 24 Sep 2024 06:16:07 -0400 (EDT) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id DD897121933 for ; Tue, 24 Sep 2024 10:16:06 +0000 (UTC) X-FDA: 82599226332.09.7171A3B Received: from esa1.hc1455-7.c3s2.iphmx.com (esa1.hc1455-7.c3s2.iphmx.com [207.54.90.47]) by imf20.hostedemail.com (Postfix) with ESMTP id 708351C0003 for ; Tue, 24 Sep 2024 10:16:04 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=fujitsu.com header.s=fj2 header.b=rutWpNBC; spf=pass (imf20.hostedemail.com: domain of lizhijian@fujitsu.com designates 207.54.90.47 as permitted sender) smtp.mailfrom=lizhijian@fujitsu.com; dmarc=pass (policy=reject) header.from=fujitsu.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1727172845; 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:references:dkim-signature; bh=Jcgu4V888HF8++mUbzVYiLy/96rQV8vr9w/gxKiaDFQ=; b=DC4lLmukx4BeZjFLFMxoeky2q8sXcVwmQtp3TMxnJk9f2Av5LR6PMix79XdoMe9Gof3ecS pU7pIe8gu2GJc1btrZoK332K228LCgZ3zX/yOkWe9oxsEeWf7YBnRvr6yoTTJ8zqD0dLHi VJcsWo8lwW0o5iFWYtyG/f2pwbgv2Bg= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1727172845; a=rsa-sha256; cv=none; b=4sV0hdz7tY1wgMJ6q7aUEuGRpqmaqgKCIVLqPnSP7rIKkjp2C3kCxUhuZNZIdRTblpsK6k iTeZDttUdsY3bfI89VcNkaMqlBCVrvZReWBHUb0OzvFhGl3WYklyoqrexeSQNwl7KIUE5K lxnLTqdfb8vYwC3LfNsv25LFb6V6W8c= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=fujitsu.com header.s=fj2 header.b=rutWpNBC; spf=pass (imf20.hostedemail.com: domain of lizhijian@fujitsu.com designates 207.54.90.47 as permitted sender) smtp.mailfrom=lizhijian@fujitsu.com; dmarc=pass (policy=reject) header.from=fujitsu.com DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=fujitsu.com; i=@fujitsu.com; q=dns/txt; s=fj2; t=1727172965; x=1758708965; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=NrioGdwCtDf6v9Dyob9Lgl6+b8tepoKpj4yVA6ow5xs=; b=rutWpNBCwUvQZRCt3XkUr3pU8kgUfCKSQ1yRdabnDFew1AhJ7D9ezupZ Cne1k8S8HmqXrAuvPffxvJVzb5GPGzhCYdt00xjTPKPjDhjpK08A+Uykc KIeMMe9Y7AdT3rFI0XathJrSXr/w4StbDx3gFlVnE0IjruxXFEGbd/p+k WBBDhnm1KJuLFUrOklrcKujTxG6qau0DwfoHFxbdx8FuXsocHWOzaEtms c7C9kPVDxsUsH3JuRFHUBbaUF/cYaHIYlYeemP2NpLivGX5wmEHONcYnh wypkHWm2kTqxdFyM2MFLzFMjd4O97hrNMSdUeo4m7F4lduLxweZerqJCW w==; X-CSE-ConnectionGUID: OZGHg8rjQS64CVRWqTv7yg== X-CSE-MsgGUID: YpQTXXznRjO/fO2Au1XxWw== X-IronPort-AV: E=McAfee;i="6700,10204,11204"; a="174565267" X-IronPort-AV: E=Sophos;i="6.10,254,1719846000"; d="scan'208";a="174565267" Received: from unknown (HELO oym-r2.gw.nic.fujitsu.com) ([210.162.30.90]) by esa1.hc1455-7.c3s2.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2024 19:16:02 +0900 Received: from oym-m4.gw.nic.fujitsu.com (oym-nat-oym-m4.gw.nic.fujitsu.com [192.168.87.61]) by oym-r2.gw.nic.fujitsu.com (Postfix) with ESMTP id 433F1D4255 for ; Tue, 24 Sep 2024 19:16:00 +0900 (JST) Received: from kws-ab4.gw.nic.fujitsu.com (kws-ab4.gw.nic.fujitsu.com [192.51.206.22]) by oym-m4.gw.nic.fujitsu.com (Postfix) with ESMTP id 74012D4C1B for ; Tue, 24 Sep 2024 19:15:59 +0900 (JST) Received: from edo.cn.fujitsu.com (edo.cn.fujitsu.com [10.167.33.5]) by kws-ab4.gw.nic.fujitsu.com (Postfix) with ESMTP id 088E640EBB for ; Tue, 24 Sep 2024 19:15:59 +0900 (JST) Received: from localhost.localdomain (unknown [10.167.135.44]) by edo.cn.fujitsu.com (Postfix) with ESMTP id 1EDF81A000B; Tue, 24 Sep 2024 18:15:58 +0800 (CST) From: Li Zhijian To: linux-mm@kvack.org Cc: David Hildenbrand , Oscar Salvador , Andrew Morton , linux-kernel@vger.kernel.org, Li Zhijian Subject: [PATCH] mm/memory_hotplug: Print the correct pfn in do_migrate_range() Date: Tue, 24 Sep 2024 18:15:54 +0800 Message-Id: <20240924101555.327091-1-lizhijian@fujitsu.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-TM-AS-Product-Ver: IMSS-9.1.0.1417-9.0.0.1002-28684.006 X-TM-AS-User-Approved-Sender: Yes X-TMASE-Version: IMSS-9.1.0.1417-9.0.1002-28684.006 X-TMASE-Result: 10--0.154800-10.000000 X-TMASE-MatchedRID: Se4t54mhS/0bO59FK9BdmLrbxxduc6FPTfK5j0EZbytaer+1iaJkEL8F Hrw7frluf146W0iUu2uN6fDbnTu0nx8TzIzimOwPlpYqKNmWxsHZs3HUcS/scCq2rl3dzGQ1z31 4VDF21MZTpjF0LDVmji87Lr8mlOQu3wv5/qh65H4GsUZRlmOtWBm3sy14XQEUEjPZKdhSZs8mt4 OYpJRnCTbenjOGpCfJUR9ws8a0/88VxRB/din+uJ07T8ZSLiAVvR84/OmB1wQp4n8eQBnwiw== X-TMASE-SNAP-Result: 1.821001.0001-0-1-22:0,33:0,34:0-0 X-Stat-Signature: qoxow4y4x6x4ghwhhzmxzwg4d7f591hc X-Rspamd-Queue-Id: 708351C0003 X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1727172964-658509 X-HE-Meta: U2FsdGVkX18R6WEXUyEciWVNZk8fChZRNCCUwTbboCG0bkUvfUGZSrlfghunfl9AJ2X8ctKo4b/TvODsbnJcjssuzQMX1aAbvNMmkBXr3+wx2sTkcKOkQfP3d3KBAXRLgJyvX+eDf9nOdJPJGCrSnog0w9W/vgfNvRxFTeG2P3aqIJTxDTpervOhYC0tkg5rVUi2ED5sqn4QEZC8TR3F08UmbVV4VM7wtfcof7aq0GcFfEuNw99r8JAIbLkz3Bm0erybAZ3ryu9OO2vhtxTCeurv8z3NavE+CscBe8yCEAmBOfl12TyJlG7rS+nm0zbSD7j0WXNbfw05cVX9OHuqETREViYkHUGoyySox2EnN7hII55dSAy5ydpQ20VKNIXqjfhNEgn4TImnGsNpmMtRhtS5yOOhoc89XP2v866Kyzv54gDts9vzN+9aXAn3TU28i8U9bLR9ZOOoKrVDQ1Xsqg2MZumwS4xPlVPUngWuVINpexiNNGbs/pqH3Aa0xdIQmXrOAfmWMmdGzegk0elAwfgrE9KINV7cafWaR9FcS4K752KcGXBZrjzJvWOb0eoSH7NQTUwWKpRGfOcCas1MCWoBn8s7RiGEtZZo1t/Epoj4pzNuFeFNvuafdrrZqcz0jTXxdUREGzJpT8sLvkWBb+iRfGs96BgFK7v2KuzKuWoFAe/tk1EVXEPX3ZoxfAyNRYlPuAR92/mgJ9SNA8VjF30SXVbGQpgmhHD4RebxgXafZSLPj1eVhRiKzl9XBBFof/trxAoy62QSd76GXQwkw6loxmG30+CxSm0CRZ/1cfXDL5Fc2fAPzJIlaJhoUueftJFD2DXZHN6oHj5ZOcjnM6aaF+XnVIXiN0UKuejWs6kDRJKfKejzH9bN4AuEhe7yEXDIg1agNtqkPxW/wYJP5KdAdeYclV5spOqQD4xP76YmmolzMCu7x2Hm84TfHO5yPXQzrTtU9XyZ7+/ijCY h6pwxpV+ C7VJU7TY/VJdOujv5XzV6Z4TvPcMdE7FyJIdD/rDrla/W0+NktnMoL1e5yNLwatxBt7dElQwVCfPr7X6KapW1bs4J2FTWWKy8SGo5i6P7a7zzjX2ZTgJDDgTmW445o5CSx9zHcWawxkDYqA854vB+7MRLUvjeXHa+O1Qfyb/eLMLrPlAC1ibr0bE8hIeQHkhpu1NMO3GDCcoj3LAAmDXFEfTt7RzZO8n50Uc1+qGZf0832+RDZ/a3mX5RmvSJXZPMuacOHLD+PSgq2w5GMHl6VqlNXLpxRrkWhM6+2EukLJUnxDOXLuYvvOkd/A== 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: List-Subscribe: List-Unsubscribe: The pfn value needs to be retrieved correctly when PageTransHuge(page) is true. Fix it by replacing the usage of 'pfn' with 'page_to_pfn(page)' to ensure the correct pfn is printed in warning messages when isolation fails. Signed-off-by: Li Zhijian --- mm/memory_hotplug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 26790c8d5b43..000430406a9e 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -1829,7 +1829,7 @@ static void do_migrate_range(unsigned long start_pfn, unsigned long end_pfn) } else { if (__ratelimit(&migrate_rs)) { - pr_warn("failed to isolate pfn %lx\n", pfn); + pr_warn("failed to isolate pfn %lx\n", page_to_pfn(page)); dump_page(page, "isolation failed"); } }