Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp803384rdg; Wed, 11 Oct 2023 06:08:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG5XHHtYh7QcX+KSEZDkSst8fdxRQ1W1SPH/sUDUtgIhq4t4YOv8p+a5f+Uxe2yuGtB0T4r X-Received: by 2002:a05:6a00:849:b0:68e:2c2a:5172 with SMTP id q9-20020a056a00084900b0068e2c2a5172mr27126114pfk.6.1697029712753; Wed, 11 Oct 2023 06:08:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697029712; cv=none; d=google.com; s=arc-20160816; b=ycJ6Bc5+jonoPv5phnpiIKXQze6Mxu+II8YFuTfWYquCd7qo5CcL+cKV4rsmjEm+40 +YGbTacdCnJ5j30WnnURc0Tk0RTZl2iDJgK/QGXj41/zWc/3tMMJY2m9TeGmC6MeRg+G OO0+lY9fz7llqPxmn8as9UCju3t4IF9zFqU0fp3HF+dnlHb8MHbWEfudwXyRY9i/6PMY QPB8BriasCYWd6s6mNPQXzmdQaLY7Y5yHQ8oaeeYZRZTddC6uP+mzW0u5rhSzPh0ADJ7 rv0k9DWvSJBNyd08YVniFfPHUHaz2VPPr1SH9rEY7YUhHzIa0SPjK/soPyrcVn2OyNe+ lxxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=KcBTZkFrKCC9+uriZsI68GWlw6IK9Tb1wdFpYBJJCYg=; fh=eV3vZdxOFgy0++ih0Z6QFBqSJhG+8smLIbvEgR13jpc=; b=Cf2YFd+TliwsQga8/+KF4BW6x3WskQQspWjMicSGR5kHxy76cqPt7Age1C6+bOKTrg 50oThz3gisgSXZ2IvRbzHomeKnnObY5884M90vBhnIN9jw988TYz61phILyb+lsk9lP/ 6FwIS13wVCjpHZ9/rzdTo6d3cKkmunS/0EQ++YEKwVSnZZeU5wrxCa6yjC5P3jhHydne NK+LO2HNDylq1Eh9IO+4cFensFVP8LNSin6gW/xSSVbwErSf0ht8CyDtYo9QRha/352E IWV4VSNn4VwyXfNeoN2PyXo9GfDZAX78FzSYQ3dREEBxqg9nX3aEi3/H6H9dgTE/iHuh jg1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=HRCnUMdu; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id k3-20020a633d03000000b00588e13f4cc8si11419256pga.519.2023.10.11.06.08.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 06:08:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=HRCnUMdu; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 293538263514; Wed, 11 Oct 2023 06:08:29 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231405AbjJKNIQ (ORCPT + 99 others); Wed, 11 Oct 2023 09:08:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231334AbjJKNIP (ORCPT ); Wed, 11 Oct 2023 09:08:15 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30378B0 for ; Wed, 11 Oct 2023 06:08:13 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1697029691; 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: in-reply-to:in-reply-to:references:references; bh=KcBTZkFrKCC9+uriZsI68GWlw6IK9Tb1wdFpYBJJCYg=; b=HRCnUMdudkR0auWBbsD9vd5nJL5XsHWCK+TpeuH+ljrS+yAuh7yWwHQXVWHQtoSQ/Dg4hQ DWGlyJST7xM6ZlxJvio94UFxahqzw9eDXFuuGQq1XR0dnBTm+3zQOmKYF89WFsvw7OniM+ kJp5ZeSLgo4PWDDYMgaAreJD+C8wEdJ1Sdi1UvN8LRwpbS8q03enfWDgv4KxdGWX1c1q9w OywHOoNEYPAT6HUmGSPqAF/N2SfS5SLoIAWjZ4iyMqCdLVLAbKC+XUXnpOuo+Ra6awNvx3 lVy5ry0vgpgz08y4o/l0CpqmQGfVKto/KhbPKqAYnfxzhXtz+Nzvu1rstgmm7w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1697029691; 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: in-reply-to:in-reply-to:references:references; bh=KcBTZkFrKCC9+uriZsI68GWlw6IK9Tb1wdFpYBJJCYg=; b=hIKtc13IGbcJcA+HEU8u0u/QMSxtdx3S9gGt4y4EK3K7p6Xxo3NxxcTFFuk5co9X8DfKDy Lvpx0r8mBCR9UbDA== To: "Kirill A. Shutemov" , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org Cc: "Rafael J. Wysocki" , Peter Zijlstra , Adrian Hunter , Kuppuswamy Sathyanarayanan , Elena Reshetova , Jun Nakajima , Rick Edgecombe , Tom Lendacky , kexec@lists.infradead.org, linux-coco@lists.linux.dev, linux-kernel@vger.kernel.org, "Kirill A. Shutemov" Subject: Re: [PATCH 02/13] kernel/cpu: Add support for declaring CPU hotplug not supported In-Reply-To: <20231005131402.14611-3-kirill.shutemov@linux.intel.com> References: <20231005131402.14611-1-kirill.shutemov@linux.intel.com> <20231005131402.14611-3-kirill.shutemov@linux.intel.com> Date: Wed, 11 Oct 2023 15:08:11 +0200 Message-ID: <87il7dl32c.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.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 (fry.vger.email [0.0.0.0]); Wed, 11 Oct 2023 06:08:29 -0700 (PDT) X-Spam-Level: ** On Thu, Oct 05 2023 at 16:13, Kirill A. Shutemov wrote: > The function cpu_hotplug_not_supported() can be called to indicate that > CPU hotplug should be disabled. It does not prevent the initial bring up > of the CPU, but it stops subsequent offlining. This tells me what the patch is doing, but not the why. > This function is intended to replace CC_ATTR_HOTPLUG_DISABLED. > --- a/include/linux/cpu.h > +++ b/include/linux/cpu.h > @@ -132,6 +132,7 @@ extern void cpus_read_lock(void); > extern void cpus_read_unlock(void); > extern int cpus_read_trylock(void); > extern void lockdep_assert_cpus_held(void); > +extern void cpu_hotplug_not_supported(void); This function name sucks. The point is as you explained to prevent offlining, but not onlining. So can we please make this very clear? Something like: cpu_hotplug_disable_offlining() > +/* Cleared if platform declares CPU hotplug not supported */ > +static bool cpu_hotplug_supported = true; Again. This is not about disabling hotplug all together. Something like: static bool cpu_hotplug_offline_disabled; Which expresses clearly what this is about and does not require this awkward negation. Thanks, tglx