Re: [PATCH 2/2] sched_ext: Add cpuperf support
From: Tejun Heo
Date: Tue Jul 02 2024 - 17:12:37 EST
Hello,
On Tue, Jul 02, 2024 at 09:41:30PM +0100, Hongyan Xia wrote:
...
> Actually, if we are okay with changing the sched_class struct and touching
> the code of other classes, I wonder if a cleaner solution is just to
> completely remove sched_class->uclamp_enabled and let each class decide what
> to do in enqueue and dequeue, so instead of
>
> uclamp_inc/dec();
> p->sched_class->enqueue/dequeue_task();
>
> we can just
>
> p->sched_class->enqueue/dequeue_task();
> do_uclamp_inside_each_class();
>
> and we export uclamp_inc/dec() functions from core.c to RT, fair and ext.
> For RT and fair, just
>
> enqueue/dequeue_task_fair/rt();
> uclamp_inc/dec();
>
> For ext, maybe expose bpf_uclamp_inc/dec() to the custom scheduler. If a
> scheduler wants to reuse the current uclamp implementation, just call these.
> If not, skip them and implement its own.
That does sound a lot better. Mind writing up a patchset?
Thanks.
--
tejun