All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleksandr Tyshchenko <olekstysh@gmail.com>
To: Jan Beulich <jbeulich@suse.com>,
	Mykyta Poturai <Mykyta_Poturai@epam.com>
Cc: "Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>,
	"Anthony PERARD" <anthony.perard@vates.tech>,
	"Michal Orzel" <michal.orzel@amd.com>,
	"Julien Grall" <julien@xen.org>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH v7 3/6] Kconfig: Make cpu hotplug configurable
Date: Thu, 9 Apr 2026 20:35:25 +0300	[thread overview]
Message-ID: <29d475b6-405a-4859-bc96-57ea58eadbae@gmail.com> (raw)
In-Reply-To: <3bd1b2a8-475d-411a-bbe0-61b251079558@suse.com>



On 4/8/26 15:27, Jan Beulich wrote:
> On 08.04.2026 14:21, Mykyta Poturai wrote:

Hello all.

>> On 3/30/26 15:19, Jan Beulich wrote:
>>> On 30.03.2026 13:59, Mykyta Poturai wrote:
>>>> For the purposes of certification, we want as little code as possible to
>>>> be unconditionally compiled in. Make CPU hotplug and SMT operations
>>>> configurable to ease the process. This will also help with introducing
>>>> CPU hotplug on Arm, where it needs to be configurable.
>>>>
>>>> Signed-off-by: Mykyta Poturai <mykyta_poturai@epam.com>
>>>
>>> Looks largely okay from a technical pov; one nit and one (repeated) remark
>>> below.
>>>
>>>> --- a/xen/arch/x86/sysctl.c
>>>> +++ b/xen/arch/x86/sysctl.c
>>>> @@ -53,6 +53,11 @@ static long cf_check smt_up_down_helper(void *data)
>>>>        unsigned int cpu, sibling_mask = boot_cpu_data.x86_num_siblings - 1;
>>>>        int ret = 0;
>>>>    
>>>> +    if ( !IS_ENABLED(CONFIG_CPU_HOTPLUG) )
>>>> +    {
>>>> +        ASSERT_UNREACHABLE();
>>>> +        return -EOPNOTSUPP;
>>>> +    }
>>>>        opt_smt = up;
>>>
>>> Another blank line above this one perhaps?
>>>
>>>> --- a/xen/common/Kconfig
>>>> +++ b/xen/common/Kconfig
>>>> @@ -637,6 +637,14 @@ config SYSTEM_SUSPEND
>>>>    
>>>>    	  If unsure, say N.
>>>>    
>>>> +config CPU_HOTPLUG
>>>> +	bool "CPU online/offline support"
>>>> +	depends on X86
>>>> +	default y
>>>> +	help
>>>> +	  Enable support for bringing CPUs online and offline at runtime. On
>>>> +	  X86 this is required for disabling SMT.
>>>
>>> The name of this option may need input from others; I'm not quite convinced
>>> that this is a good name, as there's no true "hot-plugging" involved here.
>>> IOW I fear the present name is misleading.
>>
>> My first idea was "CONFIG_RUNTIME_CPU_CONTROL" I can switch back to it.
> 
> I could live with that, for at least not being misleading. CPU_ONLINE or
> CPU_ONLINE_OFFLINE might be another option, possibly better suited to
> later become a dependency (select) of a true CPU_HOTPLUG. As said, input
> from others may be helpful.

To me, CONFIG_RUNTIME_CPU_CONTROL sounds a little bit vague. Although we 
are indeed controlling CPUs at runtime, "control" could also mean 
cpufreq, power management, affinity pinning. I think 
CONFIG_CPU_ONLINE_OFFLINE is more precise, as it is clear from the name 
that we are transitioning CPUs between online and offline states.


> 
> Jan
> 



  reply	other threads:[~2026-04-09 17:35 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-30 11:59 [PATCH v7 0/6] Implement CPU hotplug on Arm Mykyta Poturai
2026-03-30 11:59 ` [PATCH v7 2/6] arm/irq: Migrate IRQs during CPU up/down operations Mykyta Poturai
2026-04-10  9:36   ` Oleksandr Tyshchenko
2026-03-30 11:59 ` [PATCH v7 1/6] arm/irq: Keep track of irq affinities Mykyta Poturai
2026-03-30 11:59 ` [PATCH v7 3/6] Kconfig: Make cpu hotplug configurable Mykyta Poturai
2026-03-30 12:19   ` Jan Beulich
2026-04-08 12:21     ` Mykyta Poturai
2026-04-08 12:27       ` Jan Beulich
2026-04-09 17:35         ` Oleksandr Tyshchenko [this message]
2026-03-30 11:59 ` [PATCH v7 4/6] arm/sysctl: Implement cpu hotplug ops Mykyta Poturai
2026-03-30 12:28   ` Jan Beulich
2026-04-09 14:34     ` Mykyta Poturai
2026-04-09 15:34       ` Jan Beulich
2026-03-30 11:59 ` [PATCH v7 6/6] docs: Document CPU hotplug Mykyta Poturai
2026-03-30 12:37   ` Jan Beulich
2026-03-30 11:59 ` [PATCH v7 5/6] tools: Allow building xen-hptool without CONFIG_MIGRATE Mykyta Poturai
2026-03-30 12:32   ` Jan Beulich
2026-04-15 14:51     ` Mykyta Poturai
2026-04-16  6:49       ` Jan Beulich
2026-04-16  8:22         ` Mykyta Poturai
2026-04-16  8:27           ` Jan Beulich
2026-04-29 14:33           ` Anthony PERARD
2026-05-06  8:52             ` Mykyta Poturai
2026-05-13 14:00               ` Anthony PERARD

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=29d475b6-405a-4859-bc96-57ea58eadbae@gmail.com \
    --to=olekstysh@gmail.com \
    --cc=Mykyta_Poturai@epam.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=anthony.perard@vates.tech \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=michal.orzel@amd.com \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.