Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3664949rdh; Mon, 27 Nov 2023 23:34:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IFmxEcY+9Q7EaOUKrG2150gJCLg1Sx/9ue+rjvDyRwvzZtnJi3icZ0NUhk8fhAQDx85r0Op X-Received: by 2002:a17:902:9044:b0:1cf:a3e1:21b1 with SMTP id w4-20020a170902904400b001cfa3e121b1mr11166291plz.66.1701156892543; Mon, 27 Nov 2023 23:34:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701156892; cv=none; d=google.com; s=arc-20160816; b=n9i6KIPFsTBQrpfQzhQq7AZuEbL0fH13zrY5n/1eDQS4rQpqoASVwYSqwtsuPBAGnc LBnH8whFlaugOHYxS7a2EAAeWewZAVlUfsSKwUt3K78H7Mkqy0l3F5asQ4Xxbrc1BFWK 8272Cfnx8eAIX7PvsO+5+238uVZKoBj7L8pQKKdvkP/EMouRFJdU2zt2GQ0agK7PMWBX L/R9jNKVQl2AckP/xk+zxJ/NZwyBHwW4cibrKXjy1+GuF5DfW5Brza8vTAnWr4Hug+BU LZAzGDT2PG4CU9T+tx/d6HSKbmdDzOQZPW4Xh5WzlzqFyMb4pJ5isNdOh3UHf5Sy3Fxe CSgw== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=OguxvPhmIBoZQOm1YAs1KZATE7vclINtSzPsNknfn1Q=; fh=AhFe2uHX5jXPtYlRndpvB/CvvhO+byI/8X+mePGwMo8=; b=h/SmRmhOuIrr8nbLDJj0v8R93AdNzouzusYxfZsrxffzMPd5ERA3cvnr+TrWzePQ3A sgjiO0osU+VUmY94Dm0CmixYHr0eIaO3ibhxTxJC8TKvVM+Of1FZPv+miJvgtCBL3R7m W1d86WGYlrkopqKNif+aXHxqtSMqUx5p7OCkTfvs85xnRL0aV5ZUa6BZ60k5qgVyiV8X FMlhp9xFtL8pM+Xq7O/hpuupy3x/bIOawtdZUZyDHdIodcEIU3my2sTnYR8wlOlt/arQ GGxnpSbe1uxsUfKiqok045lgkW49PAwpwyWJLTQrgSyF5uLA6mQjBQYROv+orwRGurer Rpng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=IS+LwxIO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id f7-20020a170902ce8700b001cfb4a89e6esi7408932plg.145.2023.11.27.23.34.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 23:34:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=IS+LwxIO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (Postfix) with ESMTP id 3508B81A4FE5; Mon, 27 Nov 2023 23:34:50 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230316AbjK1Hef (ORCPT + 99 others); Tue, 28 Nov 2023 02:34:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234606AbjK1Hed (ORCPT ); Tue, 28 Nov 2023 02:34:33 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 926A11AE for ; Mon, 27 Nov 2023 23:34:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701156878; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OguxvPhmIBoZQOm1YAs1KZATE7vclINtSzPsNknfn1Q=; b=IS+LwxIOe1Hp5BzDJaC2tP7ZS47nahCxmQzYflhsNQ1VKGrI2sYryvdbdGFb90xIou8LTY 8Yjt1CCSDc4JklhbAmzKMulITWexVDCFtwbue8Z8EZj3cDORXr2Q+a82C8Q4kJtBDw8kZD xtoI4wI0VZxkJ80VZToTFNqhjDgGm9o= 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-695-tZ0bR6CoP1e88YaGQA1QVg-1; Tue, 28 Nov 2023 02:34:37 -0500 X-MC-Unique: tZ0bR6CoP1e88YaGQA1QVg-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (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 97B9281B164; Tue, 28 Nov 2023 07:34:36 +0000 (UTC) Received: from localhost (unknown [10.72.112.30]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D652B492BFA; Tue, 28 Nov 2023 07:34:35 +0000 (UTC) Date: Tue, 28 Nov 2023 15:34:32 +0800 From: Baoquan He To: Shijie Huang , k-hagio-ab@nec.com Cc: Huang Shijie , 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> <33021b87-4c6a-45fc-a6ae-265765cfcd78@amperemail.onmicrosoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.10 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 pete.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 (pete.vger.email [0.0.0.0]); Mon, 27 Nov 2023 23:34:50 -0800 (PST) On 11/28/23 at 11:31am, Shijie Huang wrote: > > 在 2023/11/28 11:25, Baoquan He 写道: > > On 11/27/23 at 11:18am, Shijie Huang wrote: > > > 在 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.) > > Maybe post these userspace patches too so that Kazu can evaluat if those > > improvement is necessary? > > No problem.  I will send out them later. Thank, Shijie. Let's wait and see if Kazu has any comment about these.