From: Tejun Heo <tj@kernel.org>
To: zhidao su <soolaugust@gmail.com>
Cc: sched-ext@lists.linux.dev, suzhidao@xiaomi.com
Subject: Re: [PATCH] sched/ext: Add tg->scx.idle which tracks the current state
Date: Wed, 8 Oct 2025 08:20:45 -1000 [thread overview]
Message-ID: <aOarfQm218sITkrG@slm.duckdns.org> (raw)
In-Reply-To: <20251008021031.630303-2-soolaugust@gmail.com>
On Wed, Oct 08, 2025 at 10:09:39AM +0800, zhidao su wrote:
> Add an idle field to the scx_task_group structure to track the current
> idle state of a task group. This field is initialized to false in
> scx_tg_init() and updated in scx_group_set_idle() when the idle state
> changes.
>
> This allows BPF schedulers to check the current idle state of a task
> group directly from the scx_task_group structure.
>
> v2: Add tg->scx.idle which tracks the current state
Hmm... maybe a blank line here? I don't know whether there actually is an
established convention but I don't think we usually put version delta
descriptions in the tag section.
> Signed-off-by: zhidao su <soolaugust@gmail.com>
...
> @@ -4273,6 +4274,9 @@ void scx_group_set_idle(struct task_group *tg, bool idle)
>
> percpu_down_read(&scx_cgroup_rwsem);
>
> + /* Update the task group's idle state */
> + tg->scx.idle = idle;
> +
> if (scx_cgroup_enabled && SCX_HAS_OP(sch, cgroup_set_idle))
> SCX_CALL_OP(sch, SCX_KF_UNLOCKED, cgroup_set_idle, NULL,
> tg_cgrp(tg), idle);
This can be either way but scx_group_set_weight() sets the weight after
calling the ops.cgroup_set_weight() is called, so let's match that.
Thanks.
--
tejun
prev parent reply other threads:[~2025-10-08 18:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-30 6:10 [PATCH] sched/ext: Implement cgroup_set_idle() callback zhidao su
2025-10-07 19:15 ` Tejun Heo
2025-10-08 2:09 ` [PATCH v2] sched/ext: Add tg->scx.idle which tracks the current state zhidao su
2025-10-08 2:09 ` [PATCH] " zhidao su
2025-10-08 18:20 ` Tejun Heo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aOarfQm218sITkrG@slm.duckdns.org \
--to=tj@kernel.org \
--cc=sched-ext@lists.linux.dev \
--cc=soolaugust@gmail.com \
--cc=suzhidao@xiaomi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox