Re: [PATCH 0/2] pseries/hotplug: Change the default behaviour of cede_offline
From: Gautham R Shenoy
Date: Sun Sep 15 2019 - 03:58:18 EST
On Thu, Sep 12, 2019 at 10:39:45AM -0500, Nathan Lynch wrote:
> "Gautham R. Shenoy" <ego@xxxxxxxxxxxxxxxxxx> writes:
> > The patchset also defines a new sysfs attribute
> > "/sys/device/system/cpu/cede_offline_enabled" on PSeries Linux guests
> > to allow userspace programs to change the state into which the
> > offlined CPU need to be put to at runtime.
> A boolean sysfs interface will become awkward if we need to add another
> mode in the future.
> What do you think about naming the attribute something like
> 'offline_mode', with the possible values 'extended-cede' and
We can do that. However, IMHO in the longer term, on PSeries guests,
we should have only one offline state - rtas-stopped. The reason for
this being, that on Linux, SMT switch is brought into effect through
the CPU Hotplug interface. The only state in which the SMT switch will
recognized by the hypervisors such as PHYP is rtas-stopped.
All other states (such as extended-cede) should in the long-term be
exposed via the cpuidle interface.
With this in mind, I made the sysfs interface boolean to mirror the
current "cede_offline" commandline parameter. Eventually when we have
only one offline-state, we can deprecate the commandline parameter as
well as the sysfs interface.
Thanks and Regards