FAILED: patch "[PATCH] sched_ext: Make scx_group_set_weight() always update" failed to apply to 6.12-stable tree
Subsystems (2)
[email protected]
maintainerThe patch below does not apply to the 6.12-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.12.y
git checkout FETCH_HEAD
git cherry-pick -x c50784e99f0e7199cdb12dbddf02229b102744ef
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2025062042-retention-refocus-df92@gregkh' --subject-prefix 'PATCH 6.12.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From c50784e99f0e7199cdb12dbddf02229b102744ef Mon Sep 17 00:00:00 2001
From: Tejun Heo <[email protected]>
Date: Fri, 13 Jun 2025 13:23:07 -1000
Subject: [PATCH] sched_ext: Make scx_group_set_weight() always update
tg->scx.weight
Otherwise, tg->scx.weight can go out of sync while scx_cgroup is not enabled and ops.cgroup_init() may be called with a stale weight value.
kernel/sched/ext.c +6 -6
@@ -4241,12 +4241,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); }