Re: [PATCH] sched_ext: Provide a sysfs enable_seq counter
From: Tejun Heo
Date: Mon Sep 23 2024 - 11:32:23 EST
Hello,
On Mon, Sep 23, 2024 at 12:45:48PM +0200, Phil Auld wrote:
...
> It's not a per scheduler counter, though. It's global. We want to know
Yeah, the sequence is global but we can report the sequence at which a given
scheduler is loaded on each scheduler. That way, e.g., you can tell whether
a particular scheduler instance is the same one you looked at the last time
too.
> that a (any) scx scheduler has been loaded at some time in the past. It's
> really only interesting when 0 or > 0. The actual non-zero number and which
> scheduler(s) don't matter that much.
Not necessarily. e.g. You can also detect scheduler failing or being updated
for other reasons.
> And it needs to persist when the scheduler is unloaded (I didn't look but
> I uspect the per scheduler attrs come and go?).
Yes, the load sequence number should stay persistent across all schedulers,
but each scheduler should report the sequence number at which *it* was
loaded. Note that this doesn't really change anything now. If you only care
whether any SCX scheduler has ever been loaded, you'd always look under
root.
Thanks.
--
tejun