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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 69A37C04A95 for ; Tue, 25 Oct 2022 10:39:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232144AbiJYKjp (ORCPT ); Tue, 25 Oct 2022 06:39:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231646AbiJYKjl (ORCPT ); Tue, 25 Oct 2022 06:39:41 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D860AD88 for ; Tue, 25 Oct 2022 03:39:35 -0700 (PDT) Received: from zn.tnic (p200300ea9733e753329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:9733:e753: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 77F211EC04CB; Tue, 25 Oct 2022 12:39:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1666694374; 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=bJEdtbRqgdbjhqUqDGLu9oDkYSzHvDi/vH6BXxoFAh8=; b=JxIF5aD8t+drPh0XyHi/aIDkukRMN7v+nUHqpoC0kztFZF/DC3CYHhIjv8G0wKaXyWcgJ2 NJswHW8qF/0qgkCUBTscjqoybTkfq7npVh1L77t2FH8Z+j9aYvMn2i6v+EnvcLXRHTv8xn 0ypbB4muvtXV4mgjUbabEqF3ztjeN8Y= Date: Tue, 25 Oct 2022 12:39:34 +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: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 12, 2022 at 11:20:59AM -0500, Eric DeVolder wrote: > I once had CONFIG_CRASH_HOTPLUG, but you disagreed. > > https://lore.kernel.org/lkml/Ylgot+LUDQl+G%2F5N@zn.tnic/ > > From there I simply went with > > #if defined(CONFIG_HOTPLUG_CPU) || defined(CONFIG_MEMORY_HOTPLUG) > > which route do you prefer? If you do a single Kconfig item which depends on those two, it probably is cleaner this way. And if the max memory ranges are hardcoded you don't need the other prompt asking the user something she most likely doesn't know how to answer properly. That is, unless you wanna have that crash hotplug built in all the time. Because CONFIG_HOTPLUG_CPU is pretty much always enabled so you might just as well add the crash hotplug support unconditionally, without any Kconfig ifdeffery whatsoever except CONFIG_MEMORY_HOTPLUG as that is special and not present on the majority of hardware. But on a plain simple laptop or workstation which has CPU hotplug, would it make sense for the crash ranges to get updated too when CPUs are offlined? If so, I think you want this code present there too, without a Kconfig item. If this is server-only anyway, then a single Kconfig item sounds like not such a bad idea. I hope that makes some sense. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette