[rfc] remove hlt_cpus et al sysctls and related code

Garrett Cooper yanegomi at gmail.com
Wed May 25 16:30:10 UTC 2011


On Wed, May 25, 2011 at 9:15 AM, Andriy Gapon <avg at freebsd.org> wrote:
> 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 have mp_watchdog alone for now.  It seems to have the same issues with respect
> to dynamic CPU state change.  Besides its compilation is disabled when SCHED_ULE
> is enabled.  mp_watchdog is a nice idea, but I wonder if anyone actually uses it
> (with success).

    I'll have to test out the patch, but at first glance it seems ok
(at least the machdep.hyperthreading_allowed changes which $WORK
depends upon).
Thanks!
-Garrett


More information about the freebsd-arch mailing list