Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1189305rwb; Wed, 9 Nov 2022 14:14:31 -0800 (PST) X-Google-Smtp-Source: AMsMyM6tlxmL5Is/sU1Hnl1PuZvz9GldMxywMM4LkBbZvtDBSykzB3fv6Vd7j+RE8N0CVBhwcZa/ X-Received: by 2002:a17:906:8b81:b0:7ad:93d1:5eae with SMTP id nr1-20020a1709068b8100b007ad93d15eaemr60646957ejc.29.1668032071514; Wed, 09 Nov 2022 14:14:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668032071; cv=none; d=google.com; s=arc-20160816; b=kCvZAp3Df8SqT1mNeDpVD3irUUd4LtKOBNB7d+Q5sbkYLjBCc3psFvmRhLEV/pzNGY ScqUt9DMxx/DbP/ouQ8e4WZ0tza+1tG9Nh50updgE8beowYaGVOtkqb0OTj0/OyWIdvM W0zHMUYIV+D6y7H9KR37KVT5RWV11lK/DaMbRELDIGfo1IS3uqUhoZGU7gS6S4fgiIlC DEKIQiOl+/40ZzuS2iJ5ryeh+Qc9BTNaskEy3cZs296hUdUFKoz5U8f90ErjnawXHrUG pzl7Q/VeBxV/3ibBXM3T4BbNxzpG3L9hXrMYGFugNq2GCZUiHJerpK3P/JbkmwMlDiVU jS0w== 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:dkim-signature; bh=ZVuAEP7EZJD1bSmxJ8gb2o1Y328HRP3H25tj29o45V8=; b=NfXucXBy2j9vc66Pzl0DsLzv69pnEPQ3AWnvRozeN1D4a9T/gsRKEQ4RBeJdsb4eZz Hs7L4VxNTlAZ9SoIQcYU1oFEzTaCmOhysRlKBOYl2JHQZhOAShhZd7PsdF3M/VPiL7AJ +3cJdnTNbqEGcXBHhMDuS4Ku/PQ5lRQ2S+hkZanDPouUv0iZCECMz0aScTwfpPCNfBl1 gkHvt2FLqui6oG43rasPR4d1L8otSg8JxJjA7Ie7iUQ9YNZ8ZUyr3fUldZ+A+eOR80f8 KQR0znVKnk8xSYsA9Fg1v7JJR0suSCWJgabeci2kAxN3lr+Q0VWm6pJuydKOisq5Y6RO 1Pug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=VhK+4kug; 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=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hv9-20020a17090760c900b007830f14fffesi17514916ejc.375.2022.11.09.14.14.09; Wed, 09 Nov 2022 14:14:31 -0800 (PST) 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; dkim=pass header.i=@alien8.de header.s=dkim header.b=VhK+4kug; 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=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231827AbiKIVbY (ORCPT + 93 others); Wed, 9 Nov 2022 16:31:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229447AbiKIVbX (ORCPT ); Wed, 9 Nov 2022 16:31:23 -0500 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6BFF7659 for ; Wed, 9 Nov 2022 13:31:22 -0800 (PST) Received: from zn.tnic (p200300ea9733e7bc329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:9733:e7bc: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 094B61EC063F; Wed, 9 Nov 2022 22:31:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1668029481; 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=ZVuAEP7EZJD1bSmxJ8gb2o1Y328HRP3H25tj29o45V8=; b=VhK+4kugpuZrqOzjcVJFEOya0RABF34TBESQEqw49x4MCk5qbzJJ6ucw6BjfZRhyR4tORv +FL/nQEEWAKdEmR/dKv48qF9AYwFzl4FDSlTjNKg0l210qAK07k8SvfsgiJUD9b5cJxGTR 9Tgq13YrK2qJ2FjhI+ikBtQOxn+IB8c= Date: Wed, 9 Nov 2022 22:31:16 +0100 From: Borislav Petkov To: Eric DeVolder Cc: 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, david@redhat.com, sourabhjain@linux.ibm.com, konrad.wilk@oracle.com, boris.ostrovsky@oracle.com Subject: Re: [PATCH v13 7/7] x86/crash: add x86 crash hotplug support Message-ID: References: <20221031193604.28779-1-eric.devolder@oracle.com> <20221031193604.28779-8-eric.devolder@oracle.com> <1c11a429-b5a9-fb55-fbef-b49e760e2d1e@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS 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 Wed, Nov 09, 2022 at 09:48:33AM -0600, Eric DeVolder wrote: > ... > which then defaults HOTPLUG_CPU to on and thus this code/ifdef in question. defconfig can sometimes lag reality. In this case, the majority of machines have SMP=y because the majority of machines out there are, well, multicore. > So at this point, I'm still not sure if you want the ifdef line: > - removed altogether > - transitioned to CRASH_HOTPLUG > - leave as is So let's think out loud: * the majority of machines will have CONFIG_HOTPLUG_CPU=y because they're SMP machines and we want the elfcorehdr updates to happen when CPUs get offlined or onlined. CONFIG_MEMORY_HOTPLUG is most likely going to be =n on the majority of machines out there. (Note how the deciding factor for all this is what would make sense on the prevailing majority of machines out there.) And memory hotplug will be off for the simple reason that not so many machines have memory hotplug hardware capability. Which then means, IMHO, this functionality should be separate: have a CPU hotplug callback and a memory hotplug callback. And you kinda do that in Subject: [PATCH v13 3/7] crash: add generic infrastructure for crash hotplug support but then this all calls into a single handle_hotplug_event() and that hp_action doesn't really matter. It is used in the call to arch_crash_handle_hotplug_event(image, hp_action); but that hp_action argument is unused in the x86 version. IOW, you can do this callback regardless whether it is a CPU or memory hotplug event. So thinking about it, a single CONFIG_CRASH_HOTPLUG which unifies those CPU and memory hotplug callback functionality makes most sense to me. Because you don't really differentiate between the two in the callback actions. Anyway, this is how I see it from here. I could very well be missing an aspect, of course. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette