Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp2762122rdh; Sun, 26 Nov 2023 19:19:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IHv5vtbS3+6lidn9/o/H6qCaDj8mP5YL8Jf6krtwPyuv73cxjQO6wXoG9+eM4qgMz4UKWNx X-Received: by 2002:a17:90a:d482:b0:280:4af4:1a41 with SMTP id s2-20020a17090ad48200b002804af41a41mr19525492pju.15.1701055145624; Sun, 26 Nov 2023 19:19:05 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1701055145; cv=pass; d=google.com; s=arc-20160816; b=QGodrdY5zgZazLwAZeqo/aU/ev27j3NVdDaGfiQ6NSQuhmUhTEE91is3x3sXjGWDQc H4/TJjYMQdOx1HBDpbdJdv+zT2Oj28Ns2r++HAoHRAqFjHGVtqmMmqeh/3/S0kLjhiCJ 3fbxbTluOUs5GMkg3WlY6epeZhmVIA5upL2HHtsgMsnYsjgYSjNhKXkzTm8zXbQaKIQn VQZg0i+JKRNPzD6BLZiI3GH87vmG2K7FGZg6HTNOVsHqV2fJ/u1hwQhDJ3o1yegsKkR/ QQ48SXDoaCwhBZQ5C3+/6polO4f0UyA2GYGsx50lhgu5tP8zGdMCGmFl/2xKQyCUeRzW VDDQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:subject:user-agent:date :message-id:dkim-signature; bh=7oVf8Xoi1MeZkZ5tEksIAnZJ80pxGxaBu7w1/Y4JoYQ=; fh=PJAk1fqxodqyvTtxfc7sAbFe2GAQAsViPSZ4mkkT4a4=; b=wvgde0TP9xUQFhBq6b16hCHv+gQDaEHvjWRseOSBH5oVWr519+Tgqs5DTub34jU35W 35s3qBwbxZ8m5TarDmKIYukJLZ7EC89r4Hdr2VrhoR31J3SDXQunGxXm0BQDoyDOchNr cZsCujeqelpgIy3YuZR/LKpaurzej/IgCiEFjne9r/K7BzjKSRf4X+n2Y4CNFvs1CFHN v/U1866zv2XdwSDE9XcdrkVnzxwAIr8h8p5VXGuzB8ixa/4SG3XRXBU9+q/DgRTFALfY E54XCXMVLvMazj4+iOOJ1esh7s7sUzVnc1LhCsgdZnDUi0kQ5V7yHrE32BcP16J/XUZa Ff7w== ARC-Authentication-Results: i=2; mx.google.com; dkim=temperror (no key for signature) header.i=@amperemail.onmicrosoft.com header.s=selector1-amperemail-onmicrosoft-com header.b=lF1GkQML; arc=pass (i=1 spf=pass spfdomain=os.amperecomputing.com dkim=pass dkdomain=amperemail.onmicrosoft.com dmarc=pass fromdomain=amperemail.onmicrosoft.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id ip8-20020a17090b314800b00274df6d4c38si9138437pjb.89.2023.11.26.19.19.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Nov 2023 19:19:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=temperror (no key for signature) header.i=@amperemail.onmicrosoft.com header.s=selector1-amperemail-onmicrosoft-com header.b=lF1GkQML; arc=pass (i=1 spf=pass spfdomain=os.amperecomputing.com dkim=pass dkdomain=amperemail.onmicrosoft.com dmarc=pass fromdomain=amperemail.onmicrosoft.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 7AAFB803C46D; Sun, 26 Nov 2023 19:19:03 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231956AbjK0DSj (ORCPT + 99 others); Sun, 26 Nov 2023 22:18:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229379AbjK0DSe (ORCPT ); Sun, 26 Nov 2023 22:18:34 -0500 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2115.outbound.protection.outlook.com [40.107.93.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB8C48F for ; Sun, 26 Nov 2023 19:18:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dluHFEe55y72Or6nzF2XKXZ0fXXGbMKkmwvPGDXo9e/AlKpmd4vGwCyBhhwV5cO+wENN1dvPh9RVCj5K7q7JQpW9rH6m5RmTGT9CEid6tmlWffjaM4Kn5jjRAlJz08Biv2coKuNSVHOR/fqWJ3lTbbn5ew5N/VqQwU0lTWnCVu5ETrfFsU5qzXr97v3jZdgmtgnqUhwI3sPq0wktsuyYPN1w6xUR6rmY+kaLmC1VVjO+mCFqseQBEIXsx4lmgdKcJRVh1S16dacOpia7ILGTo+2bWGTr+CrkMITCnmHYKsQ+cDj6JhRTfDjdQOdS3WLSaigxdclibU3MdL2TRqicYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=7oVf8Xoi1MeZkZ5tEksIAnZJ80pxGxaBu7w1/Y4JoYQ=; b=KBKCRR5bmlwi5GD00ribxNO5sTfOnHY3Q0fv5REJVHF4kLVMNcHdYRJRWrs+YMf0AcgdLvoxPNWtBBuQ2x5QMuMoJe9WTaMDPqVQF6sQ3z/uDnhQyNZtRuY6bChUaDtetu3EN/w5nCWVc2Mfa3uLnp0K+XOaGKrLFkLfjAAhbLBAVlOzb5bnlcCzCZEUjyUaAyCgwqdLTurlzd+ssPj+TDCxzhfVK3JsYXe2fRQOVV6idagV79SjTb97evpbrm0qcRUdTp4L5NbjgCJjHmRCB4v1jjNudQ+A1z2U2QjzNTc3KrOh61vtk2cB+UAeOuicZpPx0kxE5qDjji7/w7kPcw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=os.amperecomputing.com; dmarc=pass action=none header.from=amperemail.onmicrosoft.com; dkim=pass header.d=amperemail.onmicrosoft.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amperemail.onmicrosoft.com; s=selector1-amperemail-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7oVf8Xoi1MeZkZ5tEksIAnZJ80pxGxaBu7w1/Y4JoYQ=; b=lF1GkQMLJMSVBySuEAVvvBw9uHA6+NSZ8S8Dz6D35aPKhJM295nZPokei57KY6aasK4MX916N20jyt4RarizX32jDRyG1FsQ5Ip3G9v8zL0CFNPuAKKRM6t4xeUOxb5Z8C/mJ9UbEh3VUUwiWyZtPrOzJb04p+znYwwvUuoCZ1o= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amperemail.onmicrosoft.com; Received: from PH0PR01MB7975.prod.exchangelabs.com (2603:10b6:510:26d::15) by SJ2PR01MB8370.prod.exchangelabs.com (2603:10b6:a03:540::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7025.27; Mon, 27 Nov 2023 03:18:35 +0000 Received: from PH0PR01MB7975.prod.exchangelabs.com ([fe80::3f45:6905:e017:3b77]) by PH0PR01MB7975.prod.exchangelabs.com ([fe80::3f45:6905:e017:3b77%7]) with mapi id 15.20.7025.020; Mon, 27 Nov 2023 03:18:35 +0000 Message-ID: <33021b87-4c6a-45fc-a6ae-265765cfcd78@amperemail.onmicrosoft.com> Date: Mon, 27 Nov 2023 11:18:27 +0800 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] crash_core: export vmemmap when CONFIG_SPARSEMEM_VMEMMAP is enabled To: Baoquan He , Huang Shijie Cc: k-hagio-ab@nec.com, lijiang@redhat.com, akpm@linux-foundation.org, vgoyal@redhat.com, dyoung@redhat.com, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, patches@amperecomputing.com References: <20231127020727.25296-1-shijie@os.amperecomputing.com> From: Shijie Huang In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: PH0P220CA0002.NAMP220.PROD.OUTLOOK.COM (2603:10b6:510:d3::14) To PH0PR01MB7975.prod.exchangelabs.com (2603:10b6:510:26d::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR01MB7975:EE_|SJ2PR01MB8370:EE_ X-MS-Office365-Filtering-Correlation-Id: 463c7504-3622-479d-189d-08dbeef78a4a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 29eWMchkudghPEU8ugv+D99KbzRPACwgjePN0oJFz5uXNgI1OmuXkygIdIFqKor0PXhGwNesAQ1RI2QbB90lImnt8Uu6BkTaO92+VnTj2MyDslpHzosD6iB1unaq6nbNmUyIXnOQOHUrbjHVpq9rvLPa4azX03BMYRRK+oFxmGSyOEmqdj1d6nLASpFscTT/1JtPlgLk+V9KMb12HpRosfUxUiEBH2sQ1A33Z+R2Q45vPqUcJ+QMbSF84ZkaQtLl4PrtwtowmtQds5hHsXHHvPfwjzRvym3NKQewj2b0TD8C8w83QtgMex1Hq10aV4L/krtmk//TeyJujsDanJHUmSIbS3eYOeiCm9cttWAA0GG+eVTy5qQdzkpRM3RdBij/KZkQJtlfMOz8rhXxoFwNi8xete4bq41rRPHvTXh48mzkmmcEg3dxPHAZFKXX3y2ZCZmc0rI3v+ZWRgm8/pzWh63Hn5uOeQmaW7xXOrwC16lMPp0C7QHd6+nSn2R3C1L5DzOfTUtRxknqdloufCuFEAICbhbBn+LPJ+93V23zxwe7e71g0muMx33i3QVo/1TM0VLiiXy7HH4UcDkd5/pgUIgumW7kVYxaEMpMWkmUtqxXjHauqOBuVFeLrxE78uzS X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR01MB7975.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(39840400004)(136003)(366004)(376002)(396003)(230922051799003)(451199024)(64100799003)(1800799012)(186009)(31686004)(26005)(6486002)(2616005)(6506007)(107886003)(6666004)(478600001)(6512007)(83170400001)(38100700002)(31696002)(5660300002)(41300700001)(2906002)(66946007)(42882007)(110136005)(66556008)(316002)(66476007)(4326008)(8936002)(8676002)(43740500002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Rk9YNkFBSktGUzRRWmdkSis1eW9VQTlZRVhxRlpnZkY2cUlKM3M4REk2eUdr?= =?utf-8?B?RXFkV2o1dTRPNGpDcXE3Q1M3ZDdCamdYVWphdkpaUjl3bGV3WWdIbllnY1ZX?= =?utf-8?B?cWdRazU2bmE1TWJhNmhqb3h1R0VzbHlXTk41WHRhaDhxV3BhemtxZUErdTdk?= =?utf-8?B?SGMrU3lKeEJBMlhqRzFDaWV4ampYell0Q0hJMytaWlVxdUUzc1hkc1pmQzFP?= =?utf-8?B?VUFoR3lEVmNReFkwaE4vOW15MlhSa0xORUd0clZUUTkyNjBjbVB5QzBDOW9H?= =?utf-8?B?bk1lRDJnUWtLVE5mTFVxckdqQmh6MDFPb1YrTnA1Y0tqZj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B?b2U0UndBalU5SjBNVVlQRGxSeC9uRVIzOHJwbTZ2L3ROVTZkUWVDaGRpZ0Iv?= =?utf-8?B?V3c9PQ==?= X-OriginatorOrg: amperemail.onmicrosoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 463c7504-3622-479d-189d-08dbeef78a4a X-MS-Exchange-CrossTenant-AuthSource: PH0PR01MB7975.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Nov 2023 03:18:35.0999 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: d7QEc3/P18E/akTgACmpIpSm+HIRagQYjUnVRRbuW4rmoDOAe0fFZzMGfc7I7hDra0ky3zR6l5w8NWTkNVloSkvdNXp76tbEYUf2U5pPZ+QbP9oMRcIQjRvhrcxMN6Tc X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR01MB8370 X-Spam-Status: No, score=-0.3 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Sun, 26 Nov 2023 19:19:03 -0800 (PST) 在 2023/11/27 10:51, Baoquan He 写道: > Hi, > > On 11/27/23 at 10:07am, Huang Shijie wrote: >> In memory_model.h, if CONFIG_SPARSEMEM_VMEMMAP is configed, >> kernel will use vmemmap to do the __pfn_to_page/page_to_pfn, >> and kernel will not use the "classic sparse" to do the >> __pfn_to_page/page_to_pfn. >> >> So export the vmemmap when CONFIG_SPARSEMEM_VMEMMAP is configed. >> This makes the user applications (crash, etc) get faster >> pfn_to_page/page_to_pfn operations too. > Are there Crash or makedupfile patches posted yet to make use of this? I have patches for Crash to use the 'vmemmap', but after this patch is merged, I will send it out. (I think Kazu will not merge a crash patch which depends on a kernel patch which is not merged.) Thanks Huang Shijie >> Signed-off-by: Huang Shijie >> --- >> kernel/crash_core.c | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/kernel/crash_core.c b/kernel/crash_core.c >> index efe87d501c8c..9653c4177191 100644 >> --- a/kernel/crash_core.c >> +++ b/kernel/crash_core.c >> @@ -765,6 +765,9 @@ static int __init crash_save_vmcoreinfo_init(void) >> VMCOREINFO_SYMBOL(mem_map); >> VMCOREINFO_SYMBOL(contig_page_data); >> #endif >> +#ifdef CONFIG_SPARSEMEM_VMEMMAP >> + VMCOREINFO_SYMBOL_ARRAY(vmemmap); >> +#endif >> #ifdef CONFIG_SPARSEMEM >> VMCOREINFO_SYMBOL_ARRAY(mem_section); >> VMCOREINFO_LENGTH(mem_section, NR_SECTION_ROOTS); >> -- >> 2.40.1 >>