Re: [PATCH v3 2/5] sched_ext: Manage the validity of scx_rq_clock
From: Changwoo Min
Date: Tue Dec 03 2024 - 20:42:42 EST
Hello,
On 24. 12. 4. 08:26, Tejun Heo wrote:
Hello,
On Tue, Dec 03, 2024 at 11:27:59PM +0900, Changwoo Min wrote:
An rq clock becomes valid when it is updated using update_rq_clock()
and invalidated when the rq is unlocked using rq_unpin_lock(). Also,
after long-running operations -- ops.running() and ops.update_idle() --
in a BPF scheduler, the sched_ext core invalidates the rq clock.
Hmm... why are ops.running() or ops.update_idle() special? ie. How does
sched_ext core determine what are long-running and what are not.
I investigated all sched_ext_ops. Besides these two ops, all the
rest are control operations, of which BPF operation should be
relatively simple. On the other hand, ops.running() and
ops.update_idle() are different from the others since a CPU
executes a task or becomes idle, which could be arbitrarily long.
So I think refreshing the clock in those cases would be nice.
Does it make sense to you?
Regards,
Changwoo Min