Commit 23c8dbb3 authored by zhangwei123171's avatar zhangwei123171
Browse files

sched/fair: introduce cgroup level smt expell

jingdong inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I7NJY2



-----------------------------------------------------

This feature supports enabling SMT expell by cgroup dimension.
Compared with system-level SMT expell, on the one hand, it can
guarantee the SMT expell requirements of specific online services.
At the same time, it can also improve the CPU utilization of the
whole machine to a certain extent.

system-level smt has 2 per-cpu smt status:
1. QOS_LEVEL_ONLINE
   the current is not offline task. for example, all online containers,
   systemd.
2. QOS_LEVEL_OFFLINE
   the current is offline task or idle.

cgroup level smt expell has 3 per-cpu smt status:
1. SMT_EXPELLER
   the current is online task with smt expeller capibility.
2  SMT_EXPELLED
   the curent is offline task or idle.
3. SMT_NONE
   the current is other online task.

enable:
echo  1 > /sys/fs/cgroup/cpu/xx/cpu.smt_expell

disable:
echo  0 > /sys/fs/cgroup/cpu/xx/cpu.smt_expell

Signed-off-by: default avatarzhangwei123171 <zhangwei123171@jd.com>
Reviewed-by: default avatarzhaoxiaoqiang11 <zhaoxiaoqiang11@jd.com>
parent 3feff602
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment