Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp3131446iob; Fri, 6 May 2022 19:54:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyW2OIwj7NiwdnALcSdb9alah8SjZFK0JnXlMjrk5WhXVSR2a6AOhfcuC8jNfBb2Eev+xrI X-Received: by 2002:a17:90b:3b52:b0:1dc:b438:68b7 with SMTP id ot18-20020a17090b3b5200b001dcb43868b7mr7644473pjb.166.1651892089061; Fri, 06 May 2022 19:54:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651892089; cv=none; d=google.com; s=arc-20160816; b=HMeVzBf+OIg0qTB/SHLnQRtxKKQFf/w3BLvRnEg6bf+D3ZzkDkhd4q6YeySWIr1pbW su0ntlE5knLQsBpdrEd8iFzMHvWvofo51faY2GheA5zH2Z/bo+1GPeNVABKsuhPb3NZB X4+fx/hYj8fCNR8PRJDtN+ow3iFj8VDcjT+qeP01DxVHZiFx1uMOzxD2IamSYVttJDYX UFtagCqoxWx8yO3KIcEnocnifVYwcTyg4oxInEP28gnUQVT1LiZ2Nb5HUQB3BgJpfJ9c Ia1DAqdhsqR9ely02XrG1wYQhRXOdL7E5AM2QXXa8sfpzyT/ECofMoFIF46q8fOkeFQb UQ5Q== 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; bh=2UDqJ5+QW0+A4yVWRaAdm7j2AdWoNclGSyzFIegc7AQ=; b=wFTr+Csr3YuQAL6noN5lHgoSJ9RIVY5R+yjwQ5gsiiPcXUKcH/Q8pioGAUkEkUO2SF 0R1z2BL8AZEy8nz8vGwBNG0xTSvH/cUpetV63whvILu/TkZ1v5vzgnyQ5SH8JqITLUg8 YHzViIWX8skjA6uVX6EPzMDwqmKXHQ3xN9PzqsUFRePrTUSgeXou3ouTowrbDMgxV9jp T4gPIVPOGnR6ySEMCXLIFisHRTfZicUcShfUVB3fd/d6Kzem5sySdvfqdnN8DCoJW92C t8838U8RY7oEm3gkvWmvN+8hY9u413Me6fufI/mHVhpY20vNiUcERK+o9Vxa8CvarYiH +nHw== 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=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g5-20020a636b05000000b0039ce0b60072si6526088pgc.873.2022.05.06.19.54.34; Fri, 06 May 2022 19:54:49 -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; 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=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1380594AbiEEOYN (ORCPT + 99 others); Thu, 5 May 2022 10:24:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240498AbiEEOYL (ORCPT ); Thu, 5 May 2022 10:24:11 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9558915A2D; Thu, 5 May 2022 07:20:29 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id D6F82B82D81; Thu, 5 May 2022 14:20:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 55907C385A4; Thu, 5 May 2022 14:20:22 +0000 (UTC) Date: Thu, 5 May 2022 15:20:18 +0100 From: Catalin Marinas To: Baoquan He Cc: "Leizhen (ThunderTown)" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H . Peter Anvin" , linux-kernel@vger.kernel.org, Dave Young , Vivek Goyal , Eric Biederman , kexec@lists.infradead.org, Will Deacon , linux-arm-kernel@lists.infradead.org, Rob Herring , Frank Rowand , devicetree@vger.kernel.org, Jonathan Corbet , linux-doc@vger.kernel.org, Randy Dunlap , Feng Zhou , Kefeng Wang , Chen Zhou , John Donnelly , Dave Kleikamp Subject: Re: [PATCH v22 5/9] arm64: kdump: Reimplement crashkernel=X Message-ID: References: <3fc41a94-4247-40f3-14e7-f11e3001ec33@huawei.com> <23e2dcf4-4e9a-5298-d5d8-8761b0bbbe21@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS, 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 Thu, May 05, 2022 at 11:00:19AM +0800, Baoquan He wrote: > On 05/03/22 at 11:00pm, Catalin Marinas wrote: > > So, to recap, IIUC you are fine with: > > > > crashkernel=Y - allocate within ZONE_DMA with fallback > > above with a default in ZONE_DMA (like > > x86, 256M or swiotlb size) > > Ack to this one. > > > > crashkernel=Y,high - allocate from above ZONE_DMA > > Not exactly. If there's only ZONE_DMA, crashkernel,high will > be reserved in ZONE_DMA, and crashkernel,low will be ignored. > Other than this, ack. Yes, that's fine. > > crashkernel=Y,low - allocate within ZONE_DMA > > Ack to this one. > > > > 'crashkernel' overrides the high and low while the latter two can be > > passed independently. > > crashkernel=,high can be passed independently, then a crashkernel=,low > is needed implicitly. If people don't want crashkernel=,low > explicitly, crashkernel=0,low need be specified. I find this complicating the interface. I don't know the background to the x86 implementation but we diverge already on arm64 since we talk about ZONE_DMA rather than 4G limit (though for most platforms these would be the same). I guess we could restate the difference between crashkernel= and crashkernel=,high as the hint to go for allocation above ZONE_DMA first. > An independent crashkernel=,low makes no sense. Crashkernel=,low > should be paird with crashkernel=,high. You could argue that crashkernel=,low gives the current crashkernel= behaviour, i.e. either all within ZONE_DMA or fail to allocate. So it may have some value on its own. > My personal opinion according to the existed senmantics on x86. > Otherwise, the guidance of crashkernel= |,high|,low reservation > will be complicated to write. It's more that I find the current semantics unnecessarily confusing. But even reading the x86_64 text it's not that clear. For example the default low allocation for crashkernel= and crashkernel=,high is only mentioned in the crashkernel=,low description. -- Catalin