From b31e09170522b2f9581e90805ae420cf892ffec5 Mon Sep 17 00:00:00 2001 From: John Titor <50095635+JohnRTitor@users.noreply.github.com> Date: Wed, 4 Dec 2024 00:42:35 +0530 Subject: [PATCH] README: update scx docs Signed-off-by: John Titor <50095635+JohnRTitor@users.noreply.github.com> --- README.md | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 381b9972f..ffd33af78 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@
  • Harder stuff
  • Notes
  • @@ -164,27 +164,33 @@ We do this automatically, so we can gracefully update the cache's address and ke

    Some packages are harder to use, I'll go into details in the following paragraphs.

    -

    Using linux-cachyos with sched-ext

    +

    Using sched-ext schedulers

    -

    Since sched-ext patches have been added to linux-cachyos, you can just use that kernel.

    +

    From version 6.12 onwards, sched-ext support is officially available on the upstream kernel. You can use the latest kernel (pkgs.linuxPackages_latest) or our provided CachyOS kernel (pkgs.linuxPackages_cachyos).

    -

    First, add this to your configuration:

    +

    Just add this to your configuration:

    
     {
       boot.kernelPackages = pkgs.linuxPackages_cachyos;
    -  chaotic.scx.enable = true; # by default uses scx_rustland scheduler
    +  services.scx.enable = true; # by default uses scx_rustland scheduler
     }
     
    -

    Then, with the new kernel booted, check if the correct kernel booted:

    +

    Then, reboot with the new configuration, check if the scheduler is running:

    
    -╰─λ zgrep 'SCHED_CLASS' /proc/config.gz
    -CONFIG_SCHED_CLASS_EXT=y
    +╰─λ systemctl status scx.service
     
    -

    If the scheduler is not working for some reason, you can manually start it like:

    +

    If this is not working, check if the current kernel support sched-ext feature.

    + +
    
    +╰─λ ls /sys/kernel/sched_ext/
    +enable_seq  hotplug_seq  nr_rejected  root  state  switch_all
    +
    + +

    You can also manually start a scheduler like:

    
     ╰─λ sudo scx_rusty
    @@ -197,7 +203,15 @@ CONFIG_SCHED_CLASS_EXT=y
     

    You can choose a different scheduler too.

    
     {
    -  chaotic.scx.scheduler = "scx_rusty";
    +  services.scx.scheduler = "scx_rusty";
    +}
    +
    + +

    We also provide a git version of scx to stay up to date on the latest features.

    + +
    
    +{
    +  services.scx.package = pkgs.scx_git.full;
     }