From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88977C433F5 for ; Fri, 30 Sep 2022 17:40:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0CA838D0001; Fri, 30 Sep 2022 13:40:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 07AE06B0073; Fri, 30 Sep 2022 13:40:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E5CE88D0001; Fri, 30 Sep 2022 13:40:49 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id D266A6B0071 for ; Fri, 30 Sep 2022 13:40:49 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 76DBC1C704D for ; Fri, 30 Sep 2022 17:40:49 +0000 (UTC) X-FDA: 79969467018.15.1030D0A Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by imf28.hostedemail.com (Postfix) with ESMTP id 7D57BC0011 for ; Fri, 30 Sep 2022 17:40:42 +0000 (UTC) Received: from zn.tnic (p200300ea9733e70a329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:9733:e70a:329c:23ff:fea6:a903]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id EE81F1EC01CE; Fri, 30 Sep 2022 19:40:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1664559636; 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:in-reply-to:in-reply-to: references:references; bh=rPlsW5KXga8GPT52DXx9hd1bxPky9/DpS45uUaF1jqQ=; b=LAMPYyFU5/elnJA6eLDIg0hj/h8ekXQ+HIwqaG5hORiAdOY3BXtgD2dOu4EWezSox6Kfu4 cuuNrlmnypVPqorNFf45jNS+fzd5mpIvfODZpSEW+KyeqJhlSqdYQlDu8P8BCxaqaOSm13 7DNGh8ICOnqiSTOkxmKCmlRCNRD/iVk= Date: Fri, 30 Sep 2022 19:40:35 +0200 From: Borislav Petkov To: Eric DeVolder Cc: Oscar Salvador , Andrew Morton , david@redhat.com, linux-kernel@vger.kernel.org, x86@kernel.org, kexec@lists.infradead.org, ebiederm@xmission.com, dyoung@redhat.com, bhe@redhat.com, vgoyal@redhat.com, tglx@linutronix.de, mingo@redhat.com, dave.hansen@linux.intel.com, hpa@zytor.com, nramas@linux.microsoft.com, thomas.lendacky@amd.com, robh@kernel.org, efault@gmx.de, rppt@kernel.org, sourabhjain@linux.ibm.com, linux-mm@kvack.org Subject: Re: [PATCH v12 7/7] x86/crash: Add x86 crash hotplug support Message-ID: References: <20220909210509.6286-1-eric.devolder@oracle.com> <20220909210509.6286-8-eric.devolder@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=temperror ("DNS error when getting key") header.d=alien8.de header.s=dkim header.b=LAMPYyFU; spf=pass (imf28.hostedemail.com: domain of bp@alien8.de designates 5.9.137.197 as permitted sender) smtp.mailfrom=bp@alien8.de; dmarc=temperror reason="server fail" header.from=alien8.de (policy=temperror) ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1664559649; a=rsa-sha256; cv=none; b=pzLpIT6/8F2MuAngpCSYTzPGNWeK+E/c55qG5ZTdq1e0q99usNxmoA9wQF/hOxtgtW2QmA FbhPSzOEIg9mWEQ+3Z8SRRafETDcLNEMYexVocMlMl64FHMSaZ8GNHL5EXk3/4sn1zCqfz wNhdtP2gIUKseWn1k2BLkcNd1C3rV08= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1664559649; h=from:from:sender: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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=rPlsW5KXga8GPT52DXx9hd1bxPky9/DpS45uUaF1jqQ=; b=0QkgYkRUW6Cu5OW26B8XdX3aY0b8c4Da5iFWbUo+OmOsSXoQ/H9ZvQhahv4sc6NsANGdh/ Foamqc84tVmbFWmsn6YchJKt6KU/O69m4aGtxtHUHHqiookJptvYU/gB3Int/fPtPLXT6t XR+5qJeRGU35xp27E6NjWzP6+gMwatc= Authentication-Results: imf28.hostedemail.com; dkim=temperror ("DNS error when getting key") header.d=alien8.de header.s=dkim header.b=LAMPYyFU; spf=pass (imf28.hostedemail.com: domain of bp@alien8.de designates 5.9.137.197 as permitted sender) smtp.mailfrom=bp@alien8.de; dmarc=temperror reason="server fail" header.from=alien8.de (policy=temperror) X-Rspam-User: X-Stat-Signature: nzby6tjekde3x6m7htdb3c3p8ixno1zh X-Rspamd-Queue-Id: 7D57BC0011 X-Rspamd-Server: rspam05 X-HE-Tag: 1664559642-716553 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, Sep 30, 2022 at 12:11:26PM -0500, Eric DeVolder wrote: > There is of course a way to enumerate the memory regions in use on the > machine, that is not what this code needs. In order to compute the maximum > buffer size needed (this buffer size is computed once), the count of the > maximum number of memory regions possible (even if not currently in use) is > what is needed. Isn't that max number documented somewhere in memory hotplug docs? Because then you don't need that Kconfig item either. Imagine you're a distro kernel distributor and you want crash to work on all machines your kernel works. So you go and set that number to max. And that would be the 99% of the kernel configs out there. Which means, you can just set it to max without a Kconfig item. > Oh, that would be an error of haste on my part. This should be: > depends on CRASH_DUMP && MEMORY_HOTPLUG You need a Kconfig item which enables all this gunk as MEMORY_HOTPLUG is not a omnipresent feature. And that Kconfig item should depend on the other Kconfig items of the technology you need. > Baoquan pointed me to: > > https://lore.kernel.org/lkml/cover.1656659357.git.naveen.n.rao@linux.vnet.ibm.com/T/ In that thread says: "- arch_kexec_apply_relocations_add() is only overridden by x86 and s390. Retain the function prototype for those and move the weak implementation into the header as a static inline for other architectures." So yes, that's even better. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette