2026-02-26T17:54:35Z Tejun Heo <[email protected]>: > So, I don't know how rv works (searched a bit just now) but from kernel's > POV, it seems to look mostly like an additional tracing framework, and > testing p->sched_class against exported pointer value seems like a good fit > for the use case, no? It's not like task_on_scx() or state testing is going > to give you a "better" result anyway and it's actually rather confusing to > use them outside scheduler proper as these are expected to be used while the > task's rq lock is held. I don't think rv wants to (or even can) synchronize > against scheduler internals. Using external observability mechanism seems > like the better fit here.
Yeah you got a gist of it, essentially RV would be running from the tracepoint contexts, so in this specific scenario it would be synchronised with the scheduler. Grabbing a pointer via kallsyms and comparing that will do exactly the same job, just a bit more "unofficially". I can do that if you think such an "official" function won't really be useful. Indeed if that function wouldn't make sense without the rq lock, tracepoints are probably the only valid use case.. Thanks, Gabriele
