Re: Disabling CPUs

From: Paul Procacci <pprocacci_at_gmail.com>
Date: Thu, 22 Sep 2022 06:55:31 UTC
On Thu, Sep 22, 2022 at 1:15 AM Kevin Oberman <rkoberman@gmail.com> wrote:

> On Wed, Sep 21, 2022 at 7:26 PM Paul Procacci <pprocacci@gmail.com> wrote:
>
>> (Resending with list included)
>>
>> Hey Keith,
>>
>> Taken from smp(4):
>>
>>      FreeBSD allows specific CPUs on a multi-processor system to be
>> disabled.
>>      This can be done using the hint.lapic.X.disabled tunable, where X is
>> the
>>      APIC ID of a CPU.  Setting this tunable to 1 will result in the
>>      corresponding CPU being disabled.
>>
>> smp(4) further describes how to detect CPU topologies and whatnot.
>> Specifically the following sysctl seems useful: kern.sched.topology_spec
>>
>> Though I'm not entirely sure, I'd personally start with the above.
>>
>> ~Paul
>>
>> On Wed, Sep 21, 2022 at 10:06 PM Kevin Oberman <rkoberman@gmail.com>
>> wrote:
>>
>>> I am looking to disable all 8 E-cores on my Alder Lake system to prevent
>>> repeated crashes. The man page has an example of this:
>>> Modify the cpuset all threads are in by default to contain only the
>>> first 4 CPUs, leaving the rest idle:
>>>            cpuset -l 0-3 -s 1
>>> I did this, but in subsequent port build, all 12 "CPUs" were running at
>>> 100%. Am I missing something? Maybe use -p 1" instead of "-s 1".
>>>
>>> I also found suggestions to use "hint.lapic.N.disabled", but teh lines
>>> that were supposed to be in dmesg and the messages log were not present. I
>>> am baffled, but really need to do something to stop the crashes currently
>>> impacting Alder Lake systems.
>>> --
>>> Kevin Oberman, Part time kid herder and retired Network Engineer
>>> E-mail: rkoberman@gmail.com
>>> PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683
>>>
>>
>>
>> --
>> __________________
>>
>> :(){ :|:& };:
>>
>
>
>
> Nothing looks useful in kern.sched. I am wondering if SCHED_4BSD is
> impacting this. My knowledge of the schedulers is minimal, but 4BSD
> provided much better responsiveness than ULE.I 've been running 4BSD on my
> systems (excluding servers) for over a decade... Probably much longer. I
> may try building a kernel with ULE and see what effect that has.
>
> # sysctl kern.sched
> kern.sched.runq_fuzz: 1
> kern.sched.ipiwakeup.useloop: 0
> kern.sched.ipiwakeup.usemask: 1
> kern.sched.ipiwakeup.delivered: 26954287
> kern.sched.ipiwakeup.requested: 26899799
> kern.sched.ipiwakeup.enabled: 1
> kern.sched.slice: 12
> kern.sched.quantum: 94488
> kern.sched.name: 4BSD
> kern.sched.preemption: 1
> kern.sched.cpusetsize: 32
> -
> Kevin Oberman, Part time kid herder and retired Network Engineer
> E-mail: rkoberman@gmail.com
> PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683
>


Really wished you mentioned that part about 4BSD from the get-go.  ;)
I switched to ULE shortly after it was released in ~05' and haven't looked
back.
The topology_spec sysctl is a ULE scheduler thing only from what I can tell.

Sorry!

~Paul
-- 
__________________

:(){ :|:& };: