Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2819173iog; Mon, 27 Jun 2022 03:42:41 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vfBQF6jCKbyetJK1KwGRX6iy2Wucs8U2LjXNzMnvX8+qBatiynOKr1ls621vrfdRid6zmF X-Received: by 2002:a05:6402:2753:b0:431:9c8b:5635 with SMTP id z19-20020a056402275300b004319c8b5635mr15578884edd.152.1656326561171; Mon, 27 Jun 2022 03:42:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656326561; cv=none; d=google.com; s=arc-20160816; b=mCga7E/14fX8KLcWknfZz8iyaFXi21G3+RhbtS2y/tu3lBOmTlySfJDUpyhbbzpPEO e2wBuBf1PxaTwUs6Xb6ZGFqIPUcXkALKr4Z+Q3Ybeitx0PfjExaNSkK3a0ibnpAdBA5J q3BWcyhXQF9E4e5Her1rR76EIE60XfTxXcKZ4Vq4pgIQocLK0ElZU/FKU7rD3SrJckq0 lQE967+ngMSem6TxWCRlDN7uGmY/tkYBsiHmF0WnVPKLYtmH0Prwts7vhB+G32TfHoyI ysw0yi3zWJXk7T2NiGhbeNtu50Jsg8joGod8A66ED6dvVt7AGfJBzlSTjYvIeycaSyrJ P2pA== 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=29XAW3SdVV053hARy2DHbS6TO7CBuYcWdq0hwUUUOu8=; b=izTP7+zTqph/HbmfMZmzyKMpMudbjb0xfhFlIvmEm4fg1QZuqX+ERDfue3qPj53Own WxbOkXLQEnaDfOz88wemVA7cP5tXmwte35FoFRGWLXgkfCXelE+addEzoehbqWSC4VP6 uS2HtBPCaKZWkvohR3u5dQ7glqsln/+v0H1ArZ573Dbqy/fLdYbTC6mVdfe1DQaYj2W9 pmGjI6ZGTvDRGXIN2uws7axDVYyvSlTtDjnp/CkGtUCi+6pHTQnqB2rNyPnrZiSx7CnZ G3K8VAB8IWGcj4M1tCC2KiOr4PR++//yeAmP6ji77ZX1zdD7ZJJTJ21NeTjQviD2mfAJ 9isw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="i02/zf9j"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hd35-20020a17090796a300b006feed26a290si14114339ejc.42.2022.06.27.03.42.15; Mon, 27 Jun 2022 03:42:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="i02/zf9j"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233982AbiF0KRU (ORCPT + 99 others); Mon, 27 Jun 2022 06:17:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233938AbiF0KRT (ORCPT ); Mon, 27 Jun 2022 06:17:19 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 738536442 for ; Mon, 27 Jun 2022 03:17:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1656325036; 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=29XAW3SdVV053hARy2DHbS6TO7CBuYcWdq0hwUUUOu8=; b=i02/zf9jeGNZ63POGBjKzIzknhWwA0Rptr8MX0ZqVp0Y857DyCi4KiPZAaOCClZ78BZd6m yvi3IpMAaJCtKdRY7kPPaZvTaf1XFjO6HszsqiRJUEgOpKUarZvkbpGB4JCV6BRbsJ901R XcYIEeIT3QogvF0Wv+gJJBQj20IwBeI= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-668-_16kP6lEP1-vh2RorxSJ6Q-1; Mon, 27 Jun 2022 06:17:13 -0400 X-MC-Unique: _16kP6lEP1-vh2RorxSJ6Q-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 474EC83395C; Mon, 27 Jun 2022 10:17:12 +0000 (UTC) Received: from localhost (ovpn-13-65.pek2.redhat.com [10.72.13.65]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CDC4A404E4DD; Mon, 27 Jun 2022 10:17:10 +0000 (UTC) Date: Mon, 27 Jun 2022 18:17:07 +0800 From: Baoquan He To: "Leizhen (ThunderTown)" Cc: Catalin Marinas , Kefeng Wang , Ard Biesheuvel , Mark Rutland , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H . Peter Anvin" , Eric Biederman , Rob Herring , Frank Rowand , devicetree@vger.kernel.org, Dave Young , Vivek Goyal , kexec@lists.infradead.org, linux-kernel@vger.kernel.org, Will Deacon , linux-arm-kernel@lists.infradead.org, Jonathan Corbet , linux-doc@vger.kernel.org, Randy Dunlap , Feng Zhou , Chen Zhou , John Donnelly , Dave Kleikamp , liushixin Subject: Re: [PATCH 5/5] arm64: kdump: Don't defer the reservation of crash high memory Message-ID: References: <20220613080932.663-1-thunder.leizhen@huawei.com> <20220613080932.663-6-thunder.leizhen@huawei.com> <3f66323d-f371-b931-65fb-edfae0f01c88@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 On 06/27/22 at 05:17pm, Leizhen (ThunderTown) wrote: > > > On 2022/6/27 10:52, Baoquan He wrote: > > On 06/23/22 at 03:07pm, Catalin Marinas wrote: > >> On Wed, Jun 22, 2022 at 04:35:16PM +0800, Baoquan He wrote: > >>> On 06/21/22 at 07:04pm, Catalin Marinas wrote: > >>>> The problem with splitting is that you can end up with two entries in > >>>> the TLB for the same VA->PA mapping (e.g. one for a 4KB page and another > >>>> for a 2MB block). In the lucky case, the CPU will trigger a TLB conflict > >>>> abort (but can be worse like loss of coherency). > >>> > >>> Thanks for this explanation. Is this a drawback of arm64 design? X86 > >>> code do the same thing w/o issue, is there way to overcome this on > >>> arm64 from hardware or software side? > >> > >> It is a drawback of the arm64 implementations. Having multiple TLB > >> entries for the same VA would need additional logic in hardware to > >> detect, so the microarchitects have pushed back. In ARMv8.4, some > >> balanced was reached with FEAT_BBM so that the only visible side-effect > >> is a potential TLB conflict abort that could be resolved by software. > > > > I see, thx. > > > >> > >>> I ever got a arm64 server with huge memory, w or w/o crashkernel setting > >>> have different bootup time. And the more often TLB miss and flush will > >>> cause performance cost. It is really a pity if we have very powerful > >>> arm64 cpu and system capacity, but bottlenecked by this drawback. > >> > >> Is it only the boot time affected or the runtime performance as well? > > > > Sorry for late reply. What I observerd is the boot time serious latecy > > with huge memory. Since the timestamp is not available at that time, > > we can't tell the number. I didn't notice the runtime performance. > > There's some data here, and I see you're not on the cc list. > > https://lore.kernel.org/linux-mm/1656241815-28494-1-git-send-email-guanghuifeng@linux.alibaba.com/T/ Thanks, Zhen Lei. I also saw the patch. That seems to be a good way, since there's only one process running at that time. Not sure if there's still risk of multiple TLB entries for the same VA existing.