RE: [PATCH] kernel/cpu: The number of CPUHP_AP_ONLINE_DYN (30) is too small that stops the new dynamic states hotplug.

From: Wang, Xiaoming
Date: Mon Dec 18 2023 - 22:30:21 EST


Thank you for your response Thomas!

You get my opinion exactly.
I will modify the patch under your guide.

> 191: ia64/sep5:online
I do not know what this dynamical state mean either.
Maybe this is an irregular naming driver for X86.

I list them by cat /sys/devices/system/cpu/hotplug/states | grep online
And find the dynamical state is over 30.
So I think it need to enlarge the room for dynamic states.
Do you think this make sense?

-----Original Message-----
From: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Sent: Saturday, December 16, 2023 3:40 AM
To: Wang, Xiaoming <xiaoming.wang@xxxxxxxxx>; peterz@xxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx
Cc: Wang, Xiaoming <xiaoming.wang@xxxxxxxxx>
Subject: Re: [PATCH] kernel/cpu: The number of CPUHP_AP_ONLINE_DYN (30) is too small that stops the new dynamic states hotplug.

On Tue, Dec 12 2023 at 10:52, wangxiaoming321 wrote:

The subject line has a two issues:

1) the prefix is wrong. See
https://www.kernel.org/doc/html/latest/process/maintainer-tip.html#patch-subject

You find further information about changelogs there and in other
parts of the documentation

2) The sentence is too long and incomprehensible.

> 144: perf/x86/cstate:online
...
> 195: online

I have no idea what this number salad is trying to tell me. Changelogs need to explain the problem they are trying to solve. This listing of hotplug states is not an explanation and completely useless as it even contains an entry which do not exist:

> 191: ia64/sep5:online

Even if it would exist a ia64 hotplug callback is hardly relevant on x86, right?

Also the fixed entries e.g. workqueue and RCU/tree are irrelevant for what you are trying to describe.

So what you really want to say is something like this:

cpu/hotplug: Increase the number of dynamic states

The dynamically allocatable hotplug state space can be exhausted by
the existing drivers and infrastructure which install CPU hotplug
states dynamically. That prevents new drivers and infrastructure from
installing dynamically allocated states.

Increase the size of the CPUHP_AP_ONLINE_DYN state by 10 to make
room.

At least that's what I oracled out of your "changelog". Hmm?

Thanks,

tglx

Thanks
Xiaoming