mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
sched_ext: Merge branch 'for-6.16-fixes' into for-6.17
Pull sched_ext/for-6.16-fixes to receive:c50784e99f("sched_ext: Make scx_group_set_weight() always update tg->scx.weight")33796b9187("sched_ext, sched/core: Don't call scx_group_set_weight() prematurely from sched_create_group()") which are needed to implement CPU bandwidth control interface support. Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
@@ -4056,6 +4056,11 @@ bool scx_can_stop_tick(struct rq *rq)
|
||||
DEFINE_STATIC_PERCPU_RWSEM(scx_cgroup_rwsem);
|
||||
static bool scx_cgroup_enabled;
|
||||
|
||||
void scx_tg_init(struct task_group *tg)
|
||||
{
|
||||
tg->scx_weight = CGROUP_WEIGHT_DFL;
|
||||
}
|
||||
|
||||
int scx_tg_online(struct task_group *tg)
|
||||
{
|
||||
struct scx_sched *sch = scx_root;
|
||||
@@ -4205,12 +4210,12 @@ void scx_group_set_weight(struct task_group *tg, unsigned long weight)
|
||||
|
||||
percpu_down_read(&scx_cgroup_rwsem);
|
||||
|
||||
if (scx_cgroup_enabled && tg->scx_weight != weight) {
|
||||
if (SCX_HAS_OP(sch, cgroup_set_weight))
|
||||
SCX_CALL_OP(sch, SCX_KF_UNLOCKED, cgroup_set_weight, NULL,
|
||||
tg_cgrp(tg), weight);
|
||||
tg->scx_weight = weight;
|
||||
}
|
||||
if (scx_cgroup_enabled && SCX_HAS_OP(sch, cgroup_set_weight) &&
|
||||
tg->scx_weight != weight)
|
||||
SCX_CALL_OP(sch, SCX_KF_UNLOCKED, cgroup_set_weight, NULL,
|
||||
tg_cgrp(tg), weight);
|
||||
|
||||
tg->scx_weight = weight;
|
||||
|
||||
percpu_up_read(&scx_cgroup_rwsem);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user