OpenCloudOS-Kernel/Documentation
Michael Ellerman 7f48405c3c cpu/SMT: Allow enabling partial SMT states via sysfs
Add support to the /sys/devices/system/cpu/smt/control interface for
enabling a specified number of SMT threads per core, including partial
SMT states where not all threads are brought online.

The current interface accepts "on" and "off", to enable either 1 or all
SMT threads per core.

This commit allows writing an integer, between 1 and the number of SMT
threads supported by the machine. Writing 1 is a synonym for "off", 2 or
more enables SMT with the specified number of threads.

When reading the file, if all threads are online "on" is returned, to
avoid changing behaviour for existing users. If some other number of
threads is online then the integer value is returned.

Architectures like x86 only supporting 1 thread or all threads, should not
define CONFIG_SMT_NUM_THREADS_DYNAMIC. Architecture supporting partial SMT
states, like PowerPC, should define it.

[ ldufour: Slightly reword the commit's description ]
[ ldufour: Remove switch() in __store_smt_control() ]
[ ldufour: Rix build issue in control_show() ]

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Laurent Dufour <ldufour@linux.ibm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Zhang Rui <rui.zhang@intel.com>
Link: https://lore.kernel.org/r/20230705145143.40545-8-ldufour@linux.ibm.com
2023-07-28 09:53:37 +02:00
..
ABI cpu/SMT: Allow enabling partial SMT states via sysfs 2023-07-28 09:53:37 +02:00
PCI Merge branch 'pci/controller/endpoint' 2023-06-26 13:00:00 -05:00
RCU rcu: Remove RCU_NONIDLE() 2023-05-11 13:42:04 -07:00
accel
accounting
admin-guide A half-dozen late arriving docs patches. They are mostly fixes, but we 2023-07-06 22:15:38 -07:00
arch ARM64: 2023-07-03 15:32:22 -07:00
block Documentation/block: drop the request.rst file 2023-05-12 11:04:58 -06:00
bpf sock: Remove ->sendpage*() in favour of sendmsg(MSG_SPLICE_PAGES) 2023-06-24 15:50:13 -07:00
cdrom Documentation: use capitalization for chapters and acronyms 2023-05-16 12:49:31 -06:00
core-api workqueue: Changes for v6.5 2023-06-27 16:32:52 -07:00
cpu-freq
crypto docs: crypto: async-tx-api: fix typo in struct name 2023-06-09 01:59:30 -06:00
dev-tools - Yosry Ahmed brought back some cgroup v1 stats in OOM logs. 2023-06-28 10:28:11 -07:00
devicetree Devicetree fixes for v6.5: 2023-07-22 10:28:22 -07:00
doc-guide docs/doc-guide: Clarify how to write tables 2023-06-09 01:57:56 -06:00
driver-api Fixes for pci_clean_master, error handling in driver inits, and various 2023-07-09 09:35:51 -07:00
fault-injection lkdtm: replace ll_rw_block with submit_bh 2023-05-31 20:26:57 +01:00
fb
features LoongArch: Add jump-label implementation 2023-06-29 20:58:44 +08:00
filesystems 16 hotfixes. Six are cc:stable and the remainder address post-6.4 issues. 2023-07-08 14:30:25 -07:00
firmware-guide
firmware_class
fpga Documentation: use capitalization for chapters and acronyms 2023-05-16 12:49:31 -06:00
gpu Merge tag 'amd-drm-next-6.5-2023-06-09' of https://gitlab.freedesktop.org/agd5f/linux into drm-next 2023-06-15 14:11:22 +10:00
hid
hwmon hwmon: (oxp-sensors) Add support for AOKZOE A1 PRO 2023-06-24 20:17:18 -07:00
i2c i2c: i801: Add support for Intel Meteor Lake PCH-S 2023-06-05 10:13:48 +02:00
iio
images
infiniband
input Input: xpad - spelling fixes for "Xbox" 2023-05-22 17:28:16 -07:00
isdn
kbuild kernel-doc: don't let V=1 change outcome 2023-06-10 16:39:02 +09:00
kernel-hacking
leds - New Drivers 2023-07-03 11:26:05 -07:00
litmus-tests
livepatch
locking Documentation: use capitalization for chapters and acronyms 2023-05-16 12:49:31 -06:00
loongarch
maintainer Documentation: update git configuration for Link: tag 2023-06-21 09:15:15 -06:00
mhi
mips
misc-devices Documentation: Add TI TPS6594 PFSM 2023-06-15 13:41:53 +02:00
mm - Yosry Ahmed brought back some cgroup v1 stats in OOM logs. 2023-06-28 10:28:11 -07:00
netlabel
netlink netlink: specs: add display hints to ovs_flow 2023-06-24 15:45:49 -07:00
networking Including fixes from bluetooth, bpf and wireguard. 2023-07-05 15:44:45 -07:00
nvdimm
nvme
pcmcia Documentation: use capitalization for chapters and acronyms 2023-05-16 12:49:31 -06:00
peci
power
powerpc Documentation: Document PowerPC kernel DEXCR interface 2023-06-19 17:36:27 +10:00
process Networking fixes for 6.5-rc2, including fixes from netfilter, 2023-07-13 14:21:22 -07:00
riscv Documentation: RISC-V: hwprobe: Fix a formatting error 2023-07-11 10:43:51 -07:00
rust docs: rust: point directly to the standalone installers 2023-05-31 18:52:35 +02:00
s390 s390/iommu: get rid of S390_CCW_IOMMU and S390_AP_IOMMU 2023-05-17 15:20:18 +02:00
scheduler sched/deadline: Update GRUB description in the documentation 2023-06-16 22:08:12 +02:00
scsi scsi: docs: sym53c8xx_2: Shorten chapter heading 2023-05-22 18:36:07 -04:00
security
sound ALSA: compress: allow setting codec params after next track 2023-06-21 07:28:31 +02:00
sphinx
sphinx-static
spi
staging Documentation: use capitalization for chapters and acronyms 2023-05-16 12:49:31 -06:00
target scsi: target: docs: Remove tcm_mod_builder.py 2023-06-28 22:01:32 -04:00
timers Documentation: use capitalization for chapters and acronyms 2023-05-16 12:49:31 -06:00
tools Documentation: Add tools/rtla timerlat -u option documentation 2023-06-13 16:43:37 -04:00
trace Char/Misc and other driver subsystem updates for 6.5-rc1 2023-07-03 12:46:47 -07:00
translations A half-dozen late arriving docs patches. They are mostly fixes, but we 2023-07-06 22:15:38 -07:00
usb
userspace-api media updates for v6.5-rc1 2023-07-05 10:42:32 -07:00
virt A half-dozen late arriving docs patches. They are mostly fixes, but we 2023-07-06 22:15:38 -07:00
w1
watchdog
wmi platform/x86: dell-ddv: Fix mangled list in documentation 2023-07-11 12:15:30 +02:00
.gitignore
Changes
CodingStyle
Kconfig
Makefile
SubmittingPatches
atomic_bitops.txt
atomic_t.txt
conf.py Documentation: conf.py: Add __force to c_id_attributes 2023-05-19 08:58:10 -06:00
docutils.conf
dontdiff
index.rst
memory-barriers.txt
subsystem-apis.rst platform-drivers-x86 for v6.5-1 2023-06-30 14:50:00 -07:00