Announcement

Collapse
No announcement yet.

Rust-Written LAVD Kernel Scheduler Shows Promising Results For Linux Gaming

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #21
    Originally posted by Mathias View Post

    Everyone hates it. Better then the native schedulers, no memory corruption, live reload, .... Why is this technology so good? It should be banned. Like Javascript from webpages. How dare people put interactive stuff on the web?
    I think you misunderstood my analogy. HTML/CSS is like user-space, Javascript is like BPF, and the web engine is like the kernel. Saying that BPF is good because it can't crash the kernel is like saying that Javascript is good because it can't crash the web browser. Ok, but the web engine is literally built to render the web page and if Javascript encounters an error the website is basically unusable anyway. Like BPF, Javascript has its uses (for example, interactive content), but when you build your entire stack on Javascript, your browser has to load 500+ dependencies and 5+MB per page. The redesigned Reddit is a choppy mess on my 2015 laptop, yet the old design is as performant as ever.

    Comment


    • #22
      Originally posted by EphemeralEft View Post
      I think you misunderstood my analogy. HTML/CSS is like user-space, Javascript is like BPF, and the web engine is like the kernel. Saying that BPF is good because it can't crash the kernel is like saying that Javascript is good because it can't crash the web browser. Ok, but the web engine is literally built to render the web page and if Javascript encounters an error the website is basically unusable anyway. Like BPF, Javascript has its uses (for example, interactive content), but when you build your entire stack on Javascript, your browser has to load 500+ dependencies and 5+MB per page. The redesigned Reddit is a choppy mess on my 2015 laptop, yet the old design is as performant as ever.
      BPF is absolutely not like javascript. You cannot load two BPF schedulers at the same time. Yes BPF has many intentional limitations like this to prevent stacking to hell. BPF you run a userspace program but this then a bytecode is transfered to kernel and validated then converted to binary then run in kernel space.

      BPF is more a safe way to doing a kernel module. BPF does not allow unlimited stupidity like javascript does.

      Comment


      • #23
        Originally posted by EphemeralEft View Post

        Saying that BPF is good because it can't crash the kernel is like saying that Javascript is good because it can't crash the web browser. .
        Agreed. JavaScript should crash the kernel every time it fails.

        Comment


        • #24
          Originally posted by phor2131 View Post
          Looks like the meat of the scheduler is actually written in C:
          https://github.com/sched-ext/scx/blo...bpf/main.bpf.c
          That makes sense, AFAIK there is currently no rust to bpf compiler. From the readme:

          This scheduler consists of the BPF part and the rust part. The BPF part makes all the scheduling decisions; the rust part loads the BPF code and conducts other chores (e.g., printing sampled scheduling decisions).

          Comment


          • #25
            Originally posted by oleid View Post
            That makes sense, AFAIK there is currently no rust to bpf compiler.
            There have been experiments in it, like RedBPF, but I don't know if any are still active.

            Comment


            • #26
              Originally posted by uid313 View Post
              I wonder what scheduler Windows have, and I wonder if Microsoft have another scheduler for Xbox or what tweaks to the scheduler they use for Xbox which runs a modified version of Windows.
              Its interesting, the (actual) Xbox OS is practically a single application OS. It was forked of 2000 and heavily modified and to this day it can't really do anything but run a single application but fast. Now you probably wonder how the Xbox 360 and One/Series do run multiple things. Its simple, they run on a different OS.

              The Xbox essentially has two OS's, the specialized OS the games run on and since the Xbox One a user facing OS that is based on the Embedded/Windows Phone/Mobile codebase. They switch between via their hypervisor.

              Comment


              • #27
                Originally posted by phor2131 View Post
                Looks like the meat of the scheduler is actually written in C:
                https://github.com/sched-ext/scx/blo...bpf/main.bpf.c
                Yeah, Im a bit curious at why they choose to do the scheduling logic inside of C and no rust, but still use rust for the other bits and bobs, but I haven't played with the code itself so I can't really comment on that other then it feels weird. Rustland showcases a rust solution quite well. and there are all C scheds here too. so it feels a little odd to me personally.

                Comment


                • #28
                  I am just curious if the same performance could be achieved with EEVDF and nice -n -10 taskset -c <num> command

                  http://www.dirtcellar.net

                  Comment


                  • #29
                    Oh LAVD he coming

                    Comment


                    • #30
                      Originally posted by RejectModernity View Post
                      Why not implement it in kernel directly? Why do we need these BPF hoops?
                      Because BPF allows for rapid prototyping to experiment and prove the scheduler. There's no reason why they couldn't implement it within the kernel directly.

                      Comment

                      Working...
                      X