[rfc] remove hlt_cpus et al sysctls and related code

Attilio Rao attilio at freebsd.org
Sun May 29 03:06:33 UTC 2011


2011/5/28 Attilio Rao <attilio at freebsd.org>:
> 2011/5/25 Andriy Gapon <avg at freebsd.org>:
>> on 23/05/2011 19:28 Andriy Gapon said the following:
>>> I propose the following path for moving forward.
>>> - use hint.lapic.X.disabled to disable individual CPUs by their APIC ID
>>> - use machdep.hyperthreading_allowed tunable to disable second logical CPU on each
>>> real core
>>>
>>> The above should already work as expected.  One thing is that currently we have
>>> handling of machdep.hyperthreading_allowed tunable under SCHED_ULE.  I plan to
>>> make it unconditional.
>>>
>>> Things to remove:
>>> - all the related sysctls for dynamic onlining/offlining
>>> - machdep.hlt_logical_cpus tunable (it duplicates hint.lapic.X.disabled)
>>>
>>> It's possible to keep machdep.hlt_logical_cpus and just add some code to convert
>>> hlt_logical_cpus mask to a set of individual hint.lapic.X.disabled, but I don't
>>> see very much value in that.  But if there is a good reason to keep that tunable,
>>> I am prepared to jump through this hoop.
>>>
>>> If no one objects to this proposal, I will provide a patch soon.
>>
>> The patch is here:
>> http://people.freebsd.org/~avg/cpu-offline-sysctl.diff
>> It should implement the strategy described above.
>>
>
> I don't see the point in keeping alive mp_grab_cpu_hlt() and
> supporting, actually.
>
> On the top of your patch I made some modifies that use directly
> ap_watchdog() in cpu_idle() which I think is better for the time
> being:
> http://www.freebsd.org/~attilio/avg_rem_cpuhlt.diff
>
> If you are happy with it, just commit as long as Garrett tests that.
>
> On a second round of changes we can discuss mp_watchdog and eventual
> removal / improvements to it.

I almost forgot: this change would also require an UPDATE entry, where
you explicitly mention the "new" way to deal with CPUs. Use your
prefer wording.

Attilio


-- 
Peace can only be achieved by understanding - A. Einstein


More information about the freebsd-current mailing list