sched: Make cpu_shares_read_u64() use tg_weight()
authorTejun Heo <tj@kernel.org>
Wed, 4 Sep 2024 20:24:59 +0000 (10:24 -1000)
committerTejun Heo <tj@kernel.org>
Wed, 4 Sep 2024 20:24:59 +0000 (10:24 -1000)
commit41082c1d1d2bf6c3e989785fd1def0f09cede446
tree48f71aa853ca4fa1fc76448f14356af6858dabaa
parent859dc4ec5a4321298d8978cb6eeb3e21a2eebab5
sched: Make cpu_shares_read_u64() use tg_weight()

Move tg_weight() upward and make cpu_shares_read_u64() use it too. This
makes the weight retrieval shared between cgroup v1 and v2 paths and will be
used to implement cgroup support for sched_ext.

No functional changes.

Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/sched/core.c