From patchwork Wed Nov 16 12:10:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhen Lei X-Patchwork-Id: 1751 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp108670wru; Wed, 16 Nov 2022 04:22:21 -0800 (PST) X-Google-Smtp-Source: AA0mqf7kgXqZZvbYGXIK6aUi6/FLwXd+PiqKa3o84vBwgpUbCx6SPzvm6nQ7fR5Hy+lnFgXeVask X-Received: by 2002:a17:906:fb81:b0:7ae:9187:eb70 with SMTP id lr1-20020a170906fb8100b007ae9187eb70mr16434056ejb.533.1668601341685; Wed, 16 Nov 2022 04:22:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668601341; cv=none; d=google.com; s=arc-20160816; b=tMI0e8FkooiB+xzWCEKCYIWH/3yGpMVi+7mMCRmUuNlb78beebpnhjVq5fJ0yvDoeL Fewr72z9yGQWwJ/cScvXYzsSpkJ/Gv5q3rWxlQLXKcSoDtzzdelc/5dUCST+Gf6JL9k/ PysQZY3gMHWB5hAJpx9Es740BEaltS0Xu9/RQcP9e8P74pfxWlTrjoukwoohxOyryLCy AwFn5tkZZfmRNrB8aJme+BeHnb8ByUNhHyJRgNGhsmCIWPVLyqz0oqbWZcsHHIDPtnzt wfqXVdr/NmQk/cAsS13U7J8m8iox3apgZxI7Ni/+HKPBBeY0DrMu8/2/pkmAnoQaxQQ2 G70g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=JRsRa6Syq6Duzz/kBuWB5lWasARuTC3vOBFvV93nkZU=; b=ck9NUumLTBqBuPCu6P17ItpwT+ZVMD+UXBC1y2ofDGG/o8iVM+1jyY+11wZ7iGk3OV Yc8Wc1/NL1ftqJTlHWL97jhSlTNDFZx9fumQYVhCfXZ/V1N/nA+cXAig1jY/K4I8kmAF +gPNnEym1Sh8Nq0JIanEeVsoIXrY/s181jq6ZliCYS0lwVbNaMNBmdmMTkE4h0/TMjdY bbCwBaVWsXDbsN+dgeNW2bZI9zlqB4wjjiacYEETEN3ZeCyJRkiVw5HLghf0Ob4yPQQv SeAfq5UtFUZqKF02z8ByZKiNzsonGHai+sAUjd1SN6q/O0oBrZHBvIj61anyB7AWOPmn rgzQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id la8-20020a170907780800b007820e1a4302si12064210ejc.675.2022.11.16.04.21.53; Wed, 16 Nov 2022 04:22:21 -0800 (PST) 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; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232584AbiKPMRW (ORCPT + 99 others); Wed, 16 Nov 2022 07:17:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233170AbiKPMQa (ORCPT ); Wed, 16 Nov 2022 07:16:30 -0500 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0FFC26DF; Wed, 16 Nov 2022 04:10:57 -0800 (PST) Received: from dggpemm500020.china.huawei.com (unknown [172.30.72.55]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4NC21k3B2Bz15Mgh; Wed, 16 Nov 2022 20:10:34 +0800 (CST) Received: from dggpemm500006.china.huawei.com (7.185.36.236) by dggpemm500020.china.huawei.com (7.185.36.49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 16 Nov 2022 20:10:56 +0800 Received: from thunder-town.china.huawei.com (10.174.178.55) by dggpemm500006.china.huawei.com (7.185.36.236) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 16 Nov 2022 20:10:55 +0800 From: Zhen Lei To: Dave Young , Baoquan He , Vivek Goyal , , , Catalin Marinas , Will Deacon , , Jonathan Corbet , CC: Zhen Lei , "Eric W . Biederman" , Randy Dunlap , Feng Zhou , Kefeng Wang , "Chen Zhou" , John Donnelly , Dave Kleikamp Subject: [PATCH v4 0/2] arm64: kdump: Function supplement and performance optimization Date: Wed, 16 Nov 2022 20:10:42 +0800 Message-ID: <20221116121044.1690-1-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.37.3.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.174.178.55] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpemm500006.china.huawei.com (7.185.36.236) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749655320588844436?= X-GMAIL-MSGID: =?utf-8?q?1749655320588844436?= v3 --> v4: 1. Set DEFAULT_CRASH_KERNEL_LOW_SIZE to a fixed 128M. 2. Some lightweight code adjustments based on Catalin Marinas's comments v2 --> v3: 1. Discard patch 3 in v2, a cleanup patch. v1 --> v2: 1. Update the commit message of Patch 1, explicitly indicates that "crashkernel=X,high" is specified but "crashkernel=Y,low" is not specified. 2. Drop Patch 4-5. Currently, focus on function integrity, performance optimization will be considered in later versions. 3. Patch 3 is not mandatory, it's just a cleanup now, although it is a must for patch 4-5. But to avoid subsequent duplication of effort, I'm glad it was accepted. v1: After the basic functions of "support reserving crashkernel above 4G on arm64 kdump"(see https://lkml.org/lkml/2022/5/6/428) are implemented, we still have three features to be improved. 1. When crashkernel=X,high is specified but crashkernel=Y,low is not specified, the default crash low memory size is provided. 2. For crashkernel=X without '@offset', if the low memory fails to be allocated, fall back to reserve region from high memory(above DMA zones). 3. If crashkernel=X,high is used, page mapping is performed only for the crash high memory, and block mapping is still used for other linear address spaces. Compared to the previous version: (1) For crashkernel=X[@offset], the memory above 4G is not changed to block mapping, leave it to the next time. (2) The implementation method is modified. Now the implementation is simpler and clearer. Zhen Lei (2): arm64: kdump: Provide default size when crashkernel=Y,low is not specified arm64: kdump: Support crashkernel=X fall back to reserve region above DMA zones .../admin-guide/kernel-parameters.txt | 15 +++++------ arch/arm64/mm/init.c | 25 ++++++++++++++++--- 2 files changed, 28 insertions(+), 12 deletions(-)