Coder Social home page Coder Social logo

echo-cpu-scheduler's People

Contributors

hamadmarri avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

echo-cpu-scheduler's Issues

Kernel fails to build with CONFIG_HZ_PERIODIC

The kernel fails to build with CONFIG_HZ_PERIODIC. It seems that ECHO expects CONFIG_NO_HZ_COMMON:
kernel/sched/bs.c:879:30: error: use of undeclared identifier 'run_rebalance_domains' 879 | open_softirq(SCHED_SOFTIRQ, run_rebalance_domains); | ^

This is easily fixed by making CONFIG_ECHO_SCHED depend on CONFIG_NO_HZ_COMMON.

NO_HZ_FULL cpus idle for some time

Disabled NO_HZ_FULL, there is a bug in ECHO that keeps cpus idle for
sometime when adding full tickless args in grub nohz_full=...

Currently the easy fix is to remove the nohz_full from grub
parameters in echo linux entry. The bug still there so for
the time being I just disabled NO_HZ_FULL

How to configure ECHO?

Hi, @hamadmarri

Thank you for ECHO. I captured results comparing EEVDF, BORE, and ECHO. I now realize you made an update and will run again, and report back. Testing was on a 32-core box (64 CPU threads); AMD Ryzen Threadripper 3970X; NVIDIA RTX 3070; XanMod Edge 6.8.2 kernel. I'm unsure if bs_shared_quota is fixed or depends on the number of CPU threads?

ECHO tuning

/sys/kernel/debug/sched/base_slice_ns         6800
/proc/sys/kernel/sched_bs_shared_quota        81600 (6800 * 12)
/proc/sys/kernel/yield_type                   1

I ran 4 tasks concurrently, twice (with and without idle policy for the compute job). Afterwards, I timed a kernel compile job.

chrt -f 10 Chromium Browser https://slowroads.io/
           Google Chrome    https://webglsamples.org/blob/blob.html
                            Number of blobs: 10   Resolution: 48^3

chrt -i 0 ./algorithm3.pl 2e12    (i)
          ./algorithm3.pl 2e12   (noi)
          ./schbench          (99.0th,max)

Compile:  time HZ=800 LOCALMODCONFIG=1 ./xm-build edge-preempt
          The compile job runs separately, no other jobs.

Results

Scheduler     algo(i)  blob   sch99th  algo(noi) blob   sch99th   compile
                                max                       max
-----------   -------  -----  ------    -------  -----  ------    --------
EEVDF         41.279s  60fps  3716us    39.472s  60fps  4232us    100.682s
                              7735us                    8198us

BORE v5.0.3   41.510s  60fps  3660us    39.261s  60fps  4584us    100.269s
                              7149us                    8225us

ECHO v001     36.284s  56fps  1230us    34.692s  30fps  3404us     99.906s
                              4370us                    7909us

Observations

  1. The slowroads demo ran smoothest with ECHO under CPU load. Even though Chromium was running with 'fifo' policy, there were micro jitters with EEVDF/BORE. But quite smooth with ECHO.
  2. EEVDF/BORE has SCHED_AUTOGROUP enabled. So, launching Firefox appears in 1 second under CPU load. For ECHO, Firefox may take longer to appear depending on running background jobs with 'idle' policy.
  3. Achieving blob 60fps is possible with ECHO algo(i,noi), simply by running Google Chrome with 'fifo' policy i.e. chrt -f 10.
  4. Idle policy 'chrt -i 0' has a nice effect for ECHO, optionally apply to background jobs. That keeps ECHO responsive for the desktop environment.
  5. Possibilities; the 'fifo' and 'idle' policies are helpful.
    idle: gives background jobs less priority, keeping ECHO responsive
    fifo: gives more priority, if needed.

Blessings and grace.

Linux 6.9 support

I tested the main ECHO patch with Linux 6.9.0 upstream and it applies cleanly, builds and boots. The other two patches apply cleanly but I didn't test them.

Some more testing is definitely required but it makes sense to create a 6.9 patchset for now with the exact same contents as the 6.8 version.

Build error in function migrate_degrades_locality

Hi I get this build error

In file included from kernel/sched/bs.c:773:
kernel/sched/balancer.h: In function ‘migrate_degrades_locality’:
kernel/sched/balancer.h:349:13: error: implicit declaration of function ‘sched_idle_cpu’ [-Werror=implicit-function-declaration]
349 | if (sched_idle_cpu(cpu_of(dst_rq)))
| ^~~~~~~~~~~~~~

linux kernel 6.7.10

Here is the config file from Archlinux https://gitlab.archlinux.org/archlinux/packaging/packages/linux/-/blob/0bd29eb1601f9b1d256cf8b402ba7d5e2a04b441/config

The workarroung was to disable numa

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.