Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp963212rdb; Fri, 1 Dec 2023 03:34:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IG386dJxfU5puE5m+DaW0JuUkBLcv51uYdTxPaen0luKC/6t+MPqnn35MeV3iYaCov8CU6R X-Received: by 2002:a05:6358:8822:b0:168:e614:ace9 with SMTP id hv34-20020a056358882200b00168e614ace9mr24760705rwb.11.1701430474814; Fri, 01 Dec 2023 03:34:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701430474; cv=none; d=google.com; s=arc-20160816; b=m3jtNBL6dMypRGdhVhm7ynDS0169PpSh0eMQW4kqfYb9lpY+IK9kK60MxJmE3K28S4 eYdXtnRC2B56e3Qy/fdLSBzOq9tItOj5hDdV1ibj6gE89CquePokQPsQz+fF8svZDNpj KuQod53R8vBFlMzUCPA/FZHN/vrwHd+kuBGYexGgGnIta/maZUtGVRrU6kbg84G2l53k ND+z9kspKvxosxK7KlPKvHC7BUfRqU/1NIo2xbwff0RzKw/ys6aBoPno4t9evqrl9Em5 qlGmOsQnNlueKl8i5bnY/K+F6U5uuSMkTHc2IZMnkSOz4dDSt50d8uMnpxtn6JMSLxaU lioA== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=H76S5nJm1jWqRaGejCWH6ccm2LOJtZaVxPslQ1jiKOQ=; fh=woOK0q/ggPXhSAS9HRv1lY3XQyzcKHhJ87GUbDA09OA=; b=fBSBp+hiBfCO5rYSmJOJuHWngdvoDqkIUoceE8UbEeRVU3tnqAYdnQvAUltuyEqzWg 59+D+nsFcUlMsHIwi7qh/6puo7jl97VQUDh6i57fpw4SGJg0byqG9q1L9/T20otE3h4+ tBshS5M2fERhPkLsT7eutNdYv3r2F5R2nOlvBMulUJ+pEGDMifOt0Vy7Bc3GVSE9LOi6 wSNv1vaf/LleQ0aOrKXSeWGsWBinY1oxYE+LRJqFGMwMORr7ThV8XJkGLcR9b8y0hgBM dvOuDHwy3UEgf4n9rJt/dnJ3c2jC5gW/a5dlLlgpesCizWwjnLfZErAo1uexy7fQr2jj kVeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LawP4yJW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id f22-20020a63f116000000b00578ea9a0b93si3197005pgi.890.2023.12.01.03.34.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 03:34:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LawP4yJW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (Postfix) with ESMTP id 3CA4880F7E5B; Fri, 1 Dec 2023 03:34:32 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378574AbjLALeH (ORCPT + 99 others); Fri, 1 Dec 2023 06:34:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378541AbjLALeG (ORCPT ); Fri, 1 Dec 2023 06:34:06 -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 E355DF1 for ; Fri, 1 Dec 2023 03:34:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701430452; 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=H76S5nJm1jWqRaGejCWH6ccm2LOJtZaVxPslQ1jiKOQ=; b=LawP4yJWUzcM15gb2Ek8ZbJItc1tk9luuih3SlKfYX6qVtI12F2SwCVnDPDKs089Rb9t6Y 4img4nygG1BAdGUY3NPZnBaKsgQ8K3J1KBC1asiIjtosm8atUvcusbGc0mb1RiviT/X8PA iLMm/NOoAOP0R2hZFyS7H0gH/zum/Zw= 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-607-B9N1asX_MoOt3O0iCcnc5Q-1; Fri, 01 Dec 2023 06:34:09 -0500 X-MC-Unique: B9N1asX_MoOt3O0iCcnc5Q-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (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 A5FEF811E7D; Fri, 1 Dec 2023 11:34:08 +0000 (UTC) Received: from rotkaeppchen (unknown [10.39.194.211]) by smtp.corp.redhat.com (Postfix) with ESMTP id 93FF32166B26; Fri, 1 Dec 2023 11:34:07 +0000 (UTC) Date: Fri, 1 Dec 2023 12:34:04 +0100 From: Philipp Rudo To: Jiri Bohac Cc: Baoquan He , Vivek Goyal , Dave Young , kexec@lists.infradead.org, linux-kernel@vger.kernel.org, mhocko@suse.cz Subject: Re: [PATCH 0/4] kdump: crashkernel reservation from CMA Message-ID: <20231201123404.49a46a64@rotkaeppchen> In-Reply-To: References: Organization: Red Hat inc. MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 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 agentk.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 (agentk.vger.email [0.0.0.0]); Fri, 01 Dec 2023 03:34:32 -0800 (PST) Hi Jiri, I'd really love to see something like this to work. Although I also share the concerns about shitty device drivers corrupting the CMA. Please see my other mail for that. Anyway, one more comment below. On Fri, 24 Nov 2023 20:54:36 +0100 Jiri Bohac wrote: [...] > Now, specifying > crashkernel=100M craskhernel=1G,cma > on the command line will make a standard crashkernel reservation > of 100M, where kexec will load the kernel and initrd. > > An additional 1G will be reserved from CMA, still usable by the > production system. The crash kernel will have 1.1G memory > available. The 100M can be reliably predicted based on the size > of the kernel and initrd. I doubt that the fixed part can be predicted "reliably". For sure it will be more reliable than today but IMHO we will still be stuck with some guessing. Otherwise it would mean that you already know during boot which initrd the user space will be loading later on. Which IMHO is impossible as the initrd can always be rebuild with a larger size. Furthermore, I'd be careful when you are dealing with compressed kernel images. As I'm not sure how the different decompressor phases would handle scenarios where the (fixed) crashkernel memory is large enough to hold the compressed kernel (+initrd) but not the decompressed one. One more thing, I'm not sure I like that you need to reserve two separate memory regions. Personally I would prefer it if you could reserve one large region for the crashkernel but allow parts of it to be reused via CMA. Otherwise I'm afraid there will be people who only have one ,cma entry on the command line and cannot figure out why they cannot load the crash kernel. Thanks Philipp > When no crashkernel=size,cma is specified, everything works as > before. >