Message ID | 20240226020433.3353-1-shijie@os.amperecomputing.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-80392-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp1825070dyb; Sun, 25 Feb 2024 18:05:35 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW2s3j0Xo2s9YIePFSFgqYfPGXm92OR4y6vcjTLlVdzb/bhbITT31TcQmO5DKmr0IaJpSKISb5vrPdwoFzxUEC4pvcgVw== X-Google-Smtp-Source: AGHT+IElbUflPp+TpQ6i5FgXcaL1RA0d1XA6v73sRC8EQmSdVeHnzJX9FZmoYGeFw+oria196C+v X-Received: by 2002:a17:906:38c2:b0:a43:2255:17a with SMTP id r2-20020a17090638c200b00a432255017amr1816404ejd.7.1708913135492; Sun, 25 Feb 2024 18:05:35 -0800 (PST) Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id ho40-20020a1709070ea800b00a434f26a7adsi408061ejc.868.2024.02.25.18.05.35 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Feb 2024 18:05:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-80392-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@os.amperecomputing.com header.s=selector2 header.b="bM/EhROD"; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-80392-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80392-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amperecomputing.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id EA3E51F21D3E for <ouuuleilei@gmail.com>; Mon, 26 Feb 2024 02:05:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 29953199DC; Mon, 26 Feb 2024 02:05:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=os.amperecomputing.com header.i=@os.amperecomputing.com header.b="bM/EhROD" Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2108.outbound.protection.outlook.com [40.107.237.108]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0941415AC4 for <linux-kernel@vger.kernel.org>; Mon, 26 Feb 2024 02:05:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.237.108 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708913120; cv=fail; b=QMVeXQp1N33v/LMcnlWI4jakRUfzt2jUjWUZYx9j7JfoY6p9fn11s+fzE58tcsFrioazUcjbf43cRf8bOUJhuuK0gE1JDa0PYDz6edinQ+H8AbriRvNhRdi0o0HPFnpZiiDdj0ifDfwgvaqI2zGZxYpJYt6AwSI1p7ILFIqCihI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708913120; c=relaxed/simple; bh=UALAJ1oxBjjHr947/Phf/k+TYM+IUo4jihfVYyA2Y9M=; h=From:To:Cc:Subject:Date:Message-Id:Content-Type:MIME-Version; b=YZAz1QFfCExG5kdH7z+LvayyCf1RhNjIDl3WvwXxNC4S2zyTv4YgQsz+XoRVGsxGJoUH5EF3heYJxNfblcj+qgbQrEcB2NOxX5UBfXYb4gLI2SgcjpMESjRyAAmw8+elOPEx83U7tpqpIXJjv9sBGijaWJsDhiCqV2SpCirirDc= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=os.amperecomputing.com; spf=pass smtp.mailfrom=os.amperecomputing.com; dkim=pass (1024-bit key) header.d=os.amperecomputing.com header.i=@os.amperecomputing.com header.b=bM/EhROD; arc=fail smtp.client-ip=40.107.237.108 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=os.amperecomputing.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=os.amperecomputing.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f+hfdkd5UTkvadPYU/qsfErXDAQW/XJ6s2iUACokA4potpZEqbDjsH3M4yGLR2HnvWRrxtowPv+CLU8cn5FsLFzrM43+rJmL+1XAjZlIxIZ71InNbxlKFDTuTXzw6lZo/oi1At+Yqg0qaJ1Lh/y3kf6zc5XiBPQZBxRvqpQEWda4iUUZny+6bPGylTHHr/1x4spJX0T4IBIlqSieoWTeDeRI1q89XlunuPbb5K64g/YWshrPMFziUAZ2QmXsiV45BP3pmkzLV62yKmUJj4bSuOVcPAaU2AUJRzISukQJuC2PXlsYjBDEtk46lt8Lo6dK7Z3Py2UYjm+vT6+IKc8E6g== 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=79HmkstDpPZXR9cKLFS06QcAmOKtmIb7fOxyDSLHeOg=; b=akW6SPQqaWN0TIYtPxEBJ5QVVeZKFrq3+0fg06xnX+vPUrmA5d7Jji2k9gRYtr3XgdaYPkUS33YLGb2c07/j+fFXlqDHLFy/EZyglTI3Z12mCBfmuEZk5v4QhoT32q3F74KXgM6qAfr8uN1OFwgToYQLMA1sKQzI0uyEY5dg32Cnz+flkuxK4IK8wv6XFRVRMeAPQ71GRE4XyX8n/pKTTc+60lYAmmRN5MY0J7C78NdKFo84uHUEtBosa7A/wEx2G/vCKSZ2KgU6nQM3Ru0TciN8BFcPZILuuYZqZuEgxfSk8/mP5HxNGTdvjKhk8ysK0Y8QMeQ1GsI4cp6UZ2pA8Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=os.amperecomputing.com; dmarc=pass action=none header.from=os.amperecomputing.com; dkim=pass header.d=os.amperecomputing.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=os.amperecomputing.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=79HmkstDpPZXR9cKLFS06QcAmOKtmIb7fOxyDSLHeOg=; b=bM/EhRODTkJ9U3d9UVHIE+aJNeKYL8vOTxR7mlbohfXaLnQxIzgQ5BAO17yWl5AXT1gpdpbNc69Oku820GG3QFy/NaHL0V3MnQtR1YgjmbonhWoQNbek1LSSvLrMZ31tBNFUUO+xLsEIzhnaqv+jMSPBRzQ8NR5djbY+fCAh02s= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=os.amperecomputing.com; Received: from PH0PR01MB7975.prod.exchangelabs.com (2603:10b6:510:26d::15) by DM4PR01MB7690.prod.exchangelabs.com (2603:10b6:8:65::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.33; Mon, 26 Feb 2024 02:05:13 +0000 Received: from PH0PR01MB7975.prod.exchangelabs.com ([fe80::91c:92f:45a5:e68a]) by PH0PR01MB7975.prod.exchangelabs.com ([fe80::91c:92f:45a5:e68a%6]) with mapi id 15.20.7316.018; Mon, 26 Feb 2024 02:05:13 +0000 From: Huang Shijie <shijie@os.amperecomputing.com> To: akpm@linux-foundation.org, bhe@redhat.com Cc: patches@amperecomputing.com, vgoyal@redhat.com, dyoung@redhat.com, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, k-hagio-ab@nec.com, lijiang@redhat.com, Huang Shijie <shijie@os.amperecomputing.com> Subject: [PATCH RESEND] crash_core: export vmemmap when CONFIG_SPARSEMEM_VMEMMAP is enabled Date: Mon, 26 Feb 2024 10:04:33 +0800 Message-Id: <20240226020433.3353-1-shijie@os.amperecomputing.com> X-Mailer: git-send-email 2.40.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: CH5P222CA0005.NAMP222.PROD.OUTLOOK.COM (2603:10b6:610:1ee::16) To PH0PR01MB7975.prod.exchangelabs.com (2603:10b6:510:26d::15) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR01MB7975:EE_|DM4PR01MB7690:EE_ X-MS-Office365-Filtering-Correlation-Id: cf0c53c1-c2ae-4d8c-ad2f-08dc366f5e36 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cl+DBi9TU5o0+rYsDowHhEVluBZPGmPKU4WBm9zT174HELkbIcYp5YSeMk/KZINQ5c5JLDXsC4kSlVHpqoqfMXNkSmfh/ATtj6Xe92TngOjH+L+9HiWsNKW0+6tS267v0lYeYGXwS5VpRArfHm5AdaNvMPJpsehxB3fv01790kM1jJbRMoh/fwn90PirHDDU1bEIM7UprgIUdPVYykBjE4Hwsfj4kBAWbDhfb7ogbKd56pzIaA7bO53uZCXUDbbd1SeCSajhknV2YNp3+sfnOFrjVpSWm99myObTO/pO4lf/WKv3eL4E242P0l0wK0sgT3Ej/oNDSGj+ber982OxFFVODsxQZiiLiAznMeY++M4ZkULZMm3yXEOo5v1lHzSjmZc227UMCvrzikOwPO4BgTNpOEkYAHcE+OlGHoajV136jsda/dDfhNETY4hgK5S/O9V/8zM0ALhXpTQewScXq40hLlkK4n8+EZHfSnQXlgR29dzTr/3vhLSUbyl5rZMvcvB/brY7+EStwhQsEZbXe73DarSqxa6Ba98ctvDUsMgHpVx/8HPQ9pV1tMQwR5YlsfwyYnE8VGp3W4E79Ajf5kOtAui+Kq0HA/VZ133d28z2m4aPyZM/GKsHikbrsBc2iI9/rvZmTzaI9JNvMdFwlFHI0ezCBdXrEv8xhoAQ9tSPJoEZssg804YaRrE/3JFVPnUNiGdsLZUAt7iNFjeYGQ== 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)(38350700005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 30sCXqoQzN+KsXdD+OOdo3WNkhQXNc2SjzOVxq9ub1ETjaa9DBzrDW0+LYquH1tdRiv2Vl1rpnsodlI7/K8DVT7FwVcVPZpunRT0K0VSYQL7d80teXeg3jU6ARMAaiXJsZ2/TAlxUZXm1mKLpxoD9z4fTdlPa8JN0SJ23NiWvxHB6d2qBcdxMTclw96cmRQM7gXpqHr6Xg/J1I66kA/VQV/dg01IwOOtjQSM42Vee5SQKvaY/mIjZywEiRh5tI0JTB1hfBgr8ZEaTG/8G82J3C4NxkK/Mgv5Fo+KOyp6nk/8m71/Vex6+0BR6T2kyoPt6IbYnOjZQKV3tcIfjkIWaekJMKfSGlUFyPRbOn9avwF0PdPKfvySdtrqmmmBuV9j41wlaYpms0jjzAJycSq7xMR798Xykrh6+pB9vcjcb3/J23THUPiw06KHBF7N6NFYX1EIzvuTJWGFDuhI6XQVjyiE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nRXyM9zi/39NhJwtbAGgPbigLgMmfaEKZEL+fhKG/jkflzK6ZbuiWA4TimGmc89IjQwUhZ0giUbhA== X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: cf0c53c1-c2ae-4d8c-ad2f-08dc366f5e36 X-MS-Exchange-CrossTenant-AuthSource: PH0PR01MB7975.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Feb 2024 02:05:13.2436 (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: k35nU3l1qX4igWgrHGLBJE/1t6L4hFEzGNKSqzKcBeXfK4YxFFYlDLE5l/glzJMd5IH1ZdeZyjZLVjQSzMsj1r08zAi7yfPEUwsEGlUiRNgSZEHMP8YB+jOGt3U7q/nu X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR01MB7690 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791925299591499146 X-GMAIL-MSGID: 1791925299591499146 |
Series |
[RESEND] crash_core: export vmemmap when CONFIG_SPARSEMEM_VMEMMAP is enabled
|
|
Commit Message
Huang Shijie
Feb. 26, 2024, 2:04 a.m. UTC
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. Acked-by: Baoquan He <bhe@redhat.com> Signed-off-by: Huang Shijie <shijie@os.amperecomputing.com> --- The old patch: https://lkml.org/lkml/2023/11/26/342 --- kernel/crash_core.c | 3 +++ 1 file changed, 3 insertions(+)
Comments
On Mon, 26 Feb 2024 10:04:33 +0800 Huang Shijie <shijie@os.amperecomputing.com> 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. This is significantly out of sync with development trees. Please take a look at linux-next and redo the patch if still needed?
diff --git a/kernel/crash_core.c b/kernel/crash_core.c index d48315667752..d665ddc66fec 100644 --- a/kernel/crash_core.c +++ b/kernel/crash_core.c @@ -744,6 +744,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);