Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1575952rdb; Thu, 7 Dec 2023 03:13:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IFKJVFEhUSZGPyecdn9di2Mf985mlPwqOHygEC0ARdY2eB7L963ElR7ATuHcLuiHKZnl3Rw X-Received: by 2002:a05:6358:108:b0:170:2b1e:509c with SMTP id f8-20020a056358010800b001702b1e509cmr2725019rwa.45.1701947616930; Thu, 07 Dec 2023 03:13:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701947616; cv=none; d=google.com; s=arc-20160816; b=dRl0MgIGtEK9D1GNQmgiNyJeaW2j9jnGfVfDvX4DR0uNXYhf6ltSgEI1LG1xeRkOR3 BOrEsBZdXjcLyn2PeKAmfhhEUe5MsiLFoIjEnEZp7MmDR2U0IxNlcIXTWokamrtyY6mO T0RczFdCa8/SLzK3FdWmWvxfLFXYP3Pg6GC7SbQHF/DSM1wpnDn2RzYOe8SBVFsVQ4zA JeSDNDlgrpkEG52jFs6b1oXuIxQcYjNugut4kt270arNEVlQhYJU0wG+DKmRZ8LSDecX csy36O9UJP9N58PLjOrTmqZRa0z3sG3+rQ6WdXIeheDxMqRP6uF9uOsbmD6uoLmwIpqc ESeg== 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=g9AlbuKp6i4vZhZFTL2Nt/u/GlI5HW0Gg0C26t4Adtk=; fh=iGkimpge5THjcKljFOjXF7Y85hWVuFjty+8dneGTFM4=; b=n7cD5vX0nBexhP2ksv6EFkt3g/royC432uQ6faiOzmBdC3ygVR+soLmDBUQpsGZD7w Vov3e2nCQNwHUYn9HBONDkT629P2nJEI2LJcTtp9HmAZEV1LTfQmIv8SMHvvRwVFpH9C tbjnMR0MFAK1pvErDdHowWuz0Elr/bsezeyP2qld0kfeB5vUKkGFk/TWeu9dVLc8Rf74 b2NWlSrYuZUmLYIix+T5kXa10bqjMlWr0/HjVRdV/MKs9a+qZp6jCKK/bjs7YhnDg6aV 6fV5z39Wuc25wlwzDpNuhXZoEt29hy1G3LZehIg5JGZCICdljpLxqm7MBuIttBvMyC96 vBTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Pk8wM+NR; 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 l20-20020a656814000000b005bd28c9bb23si1038742pgt.308.2023.12.07.03.13.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 03:13:36 -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=Pk8wM+NR; 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 5FDB48041FD4; Thu, 7 Dec 2023 03:13:34 -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 S1378896AbjLGLNQ (ORCPT + 99 others); Thu, 7 Dec 2023 06:13:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232372AbjLGLNP (ORCPT ); Thu, 7 Dec 2023 06:13:15 -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 E010BD5B for ; Thu, 7 Dec 2023 03:13:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701947601; 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=g9AlbuKp6i4vZhZFTL2Nt/u/GlI5HW0Gg0C26t4Adtk=; b=Pk8wM+NRTLszGRGgB9SHfhz6e9j+3ct82ASVEIUj5Dtbs/eU6USvEqGjKNuVBpqF0NWRAB VeRWPuctEQQwtB/KuVt/9ujs8Hn1kQU5cylIjGOA26oUmC5MsywRTrfvoUoBH6ox3mz+C0 NAasApB1QO+mWBj7HG5kLpdyN9b2+kU= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-507-LyxVm7zXOSSDw9WNAilHjQ-1; Thu, 07 Dec 2023 06:13:18 -0500 X-MC-Unique: LyxVm7zXOSSDw9WNAilHjQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (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 9A7B23C2A1C5; Thu, 7 Dec 2023 11:13:17 +0000 (UTC) Received: from rotkaeppchen (unknown [10.39.192.227]) by smtp.corp.redhat.com (Postfix) with ESMTP id 15F0A2026D66; Thu, 7 Dec 2023 11:13:15 +0000 (UTC) Date: Thu, 7 Dec 2023 12:13:14 +0100 From: Philipp Rudo To: Michal Hocko Cc: Baoquan He , Donald Dutile , Jiri Bohac , Pingfan Liu , Tao Liu , Vivek Goyal , Dave Young , kexec@lists.infradead.org, linux-kernel@vger.kernel.org, David Hildenbrand Subject: Re: [PATCH 0/4] kdump: crashkernel reservation from CMA Message-ID: <20231207121314.50b8e4c4@rotkaeppchen> In-Reply-To: References: <20231201123353.2b3db7fa@rotkaeppchen> <20231201165113.43211a48@rotkaeppchen> <20231206120805.4fdcb8ab@rotkaeppchen> 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.4 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]); Thu, 07 Dec 2023 03:13:34 -0800 (PST) On Thu, 7 Dec 2023 09:55:20 +0100 Michal Hocko wrote: > On Thu 07-12-23 12:23:13, Baoquan He wrote: > [...] > > We can't guarantee how swift the DMA transfer could be in the cma, case, > > it will be a venture. > > We can't guarantee this of course but AFAIK the DMA shouldn't take > minutes, right? While not perfect, waiting for some time before jumping > into the crash kernel should be acceptable from user POV and it should > work around most of those potential lingering programmed DMA transfers. I don't think that simply waiting is acceptable. For one it doesn't guarantee that there is no corruption (please also see below) but only reduces its probability. Furthermore, how long would you wait? Thing is that users don't only want to reduce the memory usage but also the downtime of kdump. In the end I'm afraid that "simply waiting" will make things unnecessarily more complex without really solving any issue. > So I guess what we would like to hear from you as kdump maintainers is > this. Is it absolutely imperative that these issue must be proven > impossible or is a best effort approach something worth investing time > into? Because if the requirement is an absolute guarantee then I simply > do not see any feasible way to achieve the goal of reusable memory. > > Let me reiterate that the existing reservation mechanism is showing its > limits for production systems and I strongly believe this is something > that needs addressing because crash dumps are very often the only tool > to investigate complex issues. Because having a crash dump is so important I want a prove that no legal operation can corrupt the crashkernel memory. The easiest way to achieve this is by simply keeping the two memory regions fully separated like it is today. In theory it should also be possible to prevent any kind of page pinning in the shared crashkernel memory. But I don't know which side effect this has for mm. Such an idea needs to be discussed on the mm mailing list first. Finally, let me question whether the whole approach actually solves anything. For me the difficulty in determining the correct crashkernel memory is only a symptom. The real problem is that most developers don't expect their code to run outside their typical environment. Especially not in an memory constraint environment like kdump. But that problem won't be solved by throwing more memory at it as this additional memory will eventually run out as well. In the end we are back at the point where we are today but with more memory. Finally finally, one tip. Next time a customer complaints about how much memory the crashkernel "wastes" ask them how much one day of down time for one machine costs them and how much memory they could buy for that money. After that calculation I'm pretty sure that an additional 100M of crashkernel memory becomes much more tempting. Thanks Philipp