Re: [PATCHSET v6] sched: Implement BPF extensible scheduler class

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 19 Jun 2024 at 22:07, Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> And scx_next_task_picked() isn't pretty - as far as I understand, it's
> because there's only a "class X picked" callback ("pick_next_task()"),
> and no way to tell other classes they weren't picked.

I guess that could be a class callback, something like this:

        p = class->pick_next_task(rq);
        if (p)
        if (p) {
-               scx_next_task_picked(rq, p, class);
+               struct sched_class *prev = last->sched_class;
+               if (class != prev && prev->switch_class)
+                       prev->switch_class(rq);
                return p;
        }

and that would be arguably much prettier. But maybe I've
mis-understood the reason for that scx_next_task_picked() thing.

Tejun?

             Linus




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux