Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp2753148rdh; Sun, 26 Nov 2023 18:51:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IHSeQgtGdpVm73NXubdf/5vbQakEP1I4okZ62jlCBL9bag/RWdv31ZRtEeat5AmZJSLrSdI X-Received: by 2002:a05:6870:ff4b:b0:1fa:1db4:46da with SMTP id qo11-20020a056870ff4b00b001fa1db446damr7020529oab.42.1701053518863; Sun, 26 Nov 2023 18:51:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701053518; cv=none; d=google.com; s=arc-20160816; b=okm4VMlWDMQq5j4qCo8KBc3lHS9bXpaa9LybS1u3AVewxuQwASx8z4KFVkh+gzuzlo rBkmaFyyyQMtnalvItIs/BudAWGJXnkdCUfzuJDszUZqX7Q2xYn2Uc93xiKLu3ljw2x+ +t9t3H4oNp4IVgZK30rr+clDLjI/qo7ey6gmZwsP0rxDHmOEAco5hWBMTbH2FmcGn/8p rp09MUtHs6olTAx2f1mDeOP8/iN1KNK3ye6+pVBLbYOj+a45njEhyCRBw+fEd340Hf56 PKT4y33KKOavJtGGLuLk7xgtRHSbJXiKQbvaiYTkEaesWMcJOb24Aog9UZEDJOrT1CNt lKMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=IKWQaEsR/p/IgYIkhOghvk9JdKsTzVVqrJ68PyhT4Os=; fh=D0O3d59SiL2PSvvPRxWIUG+zgDn/KrIkL48PZkmSjhI=; b=ajsOsVgwAntU6/lr9WiR/hEBXwQaan8+ZK30ay5iU5LyMK7QmlqtMVJ2Am/jlp3FZI ImXzENGsm0LKcOmYO3RsK8e6hU5fojb1joFcETmAg9kxBbfHpVZ/EZjzhlIFgD5yVmaV nqK+Dci3WfpBtj51Xty5HJkWjBT5zr4k69KvdMy4fCQ148BhbeVq71yY1Z7gIRYxSlgi sbOP7l5fZq65sJJbV9pxTO26N13JW85MJGhKWzRu81fMX9LN+HROtj6GkUKINU8czfEs xWZ0tBNs+YU58hPh2vS91msvQ/9IoOoaG3b+HuVbGR9+tQlufdBW1twuiEf5pHCrjFiG vtig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=aJxRoLQO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id cm4-20020a056a020a0400b005be264316d6si8188673pgb.598.2023.11.26.18.51.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Nov 2023 18:51:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=aJxRoLQO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 9148A80657DA; Sun, 26 Nov 2023 18:51:57 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231657AbjK0Cvq (ORCPT + 99 others); Sun, 26 Nov 2023 21:51:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231558AbjK0Cvp (ORCPT ); Sun, 26 Nov 2023 21:51:45 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4B69111 for ; Sun, 26 Nov 2023 18:51:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701053510; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=IKWQaEsR/p/IgYIkhOghvk9JdKsTzVVqrJ68PyhT4Os=; b=aJxRoLQORpvihQpwS2XniCdiO+rZC16Yy0Qpq+gnTz4rw7XPWXXQTUynMhcWzcvFF2NBX4 OjeB/hRgiTRN4UAH9di75WDur6fxBlV1DuTy/WtEvnHXthGLyCyQtjQI+ZzAzE6vFrmOIt Sr9/L1MLWg0z1di1vX42AhJI1jrQUVY= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-448-YUiZv4FFMWGxnDQun8zWTg-1; Sun, 26 Nov 2023 21:51:47 -0500 X-MC-Unique: YUiZv4FFMWGxnDQun8zWTg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1588A852AC0; Mon, 27 Nov 2023 02:51:47 +0000 (UTC) Received: from localhost (unknown [10.72.112.39]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2A30E1C060BB; Mon, 27 Nov 2023 02:51:45 +0000 (UTC) Date: Mon, 27 Nov 2023 10:51:43 +0800 From: Baoquan He To: 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 Subject: Re: [PATCH] crash_core: export vmemmap when CONFIG_SPARSEMEM_VMEMMAP is enabled Message-ID: References: <20231127020727.25296-1-shijie@os.amperecomputing.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231127020727.25296-1-shijie@os.amperecomputing.com> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Sun, 26 Nov 2023 18:51:58 -0800 (PST) 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? > > 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 >