[PATCH v3 1/2] cpu/smt: add a notifier to notify the SMT changes

Thomas Gleixner tglx at linutronix.de
Fri Mar 31 21:52:50 UTC 2023


On Fri, Mar 31 2023 at 05:49, WenYou Yang wrote:

<SNIP>
        Removing pointlessly copied mail headers. Please fix your email
        client
</SNIP>

>> >
>> > So what do you want to have happen when someone goes and manually
>> > offlines all the SMT siblings using
>> > /sys/devices/system/cpu/cpu*/online
>> > ?
>> 
>> I don't consider this situation.  Any suggestions will be deeply appreciated.
>
> Hi Peter,
>
> I don't find a good method to handle this situation.
> Yes, manually offlining all the SMT sibling will get the same result of SMT disabling on the fly.
>
> Actually, the normal way to enable/disable SMT on the fly is to echo on/off > /sys/device/system/cpu/smt/control

That's the most convenient way, right.

But why do we need a kernel notifier for this, if you can do the same
with a sysfs knob for your driver?

Then user space can fiddle with SMT control in sysfs and afterwards tell
the driver that it should reconfigure.

That makes a ton more sense than this random notifier.

Thanks,

        tglx


More information about the amd-gfx mailing list