Skip to content

RFC sched: CFS low-latency features

Mathieu Desnoyers lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest11 patches 37 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11sched: fix string comparison in featureskernel/sched.c+10 -10 replies
2/11sched: debug spread check account for nr_runningkernel/sched_fair.c+4 -50 replies
3/11sched: FAIR_SLEEPERS featurekernel/sched_fair.c kernel/sched_features.h+2 -10 replies
4/11sched: debug cleanup place entitykernel/sched_fair.c+1 -30 replies
5/11sched buddy enable buddy logic starting at 2 running threadskernel/sched_fair.c+7 -30 replies
6/11sched: dynamic min_vruntimekernel/sched_fair.c kernel/sched_features.h+16 -50 replies
7/11sched rename struct task in_iowait field to sched_in_iowaitinclude/linux/sched.h kernel/sched.c kernel/sched_fair.c+8 -90 replies
8/11sched input interactivity-driven next buddydrivers/input/evdev.c include/linux/sched.h kernel/sched.c +2 more+59 -230 replies
9/11sched: timer-driven next buddyinclude/linux/sched.h kernel/hrtimer.c kernel/itimer.c +6 more+46 -42 replies
10/11sched: fork expeditedinclude/linux/sched.h kernel/sched.c kernel/sched_fair.c +1 more+29 -10 replies
11/11sched: fair sleepers for timer and interactivekernel/sched_fair.c kernel/sched_features.h+7 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 00/11] sched: CFS low-latency features

Hi,

Following the findings I presented a few months ago
(http://lkml.org/lkml/2010/4/18/13) about CFS having large vruntime spread issues, Peter Zijlstra and I pursued the discussion and the implementation effort (my work on this is funded by Nokia). I recently put the result together and came up with this patchset, combining both his work and mine.

With this patchset, I got the following results with wakeup-latency.c (a 10ms periodic timer), running periodic-fork.sh, Xorg, make -j3 and firefox (playing a youtube video), with Xorg moving terminal windows around, in parallel on a UP system (links to the test program source in the dyn min_vruntime patch). The Xorg interactivity is very good with the new features enabled, but was poor originally with the vanilla mainline scheduler. The 10ms timer delays are as follow:

2.6.35.2 mainline* with low-latency features**

maximum latency:                34465.2 µs                    8261.4 µs
average latency:                 6445.5 µs                     211.2 µs
missed timer events:                yes                           no

* 2.6.35.2 mainline test needs to run periodic-fork.sh for a few minutes first to let it rip the spread apart.

** low-latency features:

with the patchset applied and CONFIG_SCHED_DEBUG=y (with debugfs mounted in /sys/debugfs)

for opt in DYN_MIN_VRUNTIME \
        NO_FAIR_SLEEPERS FAIR_SLEEPERS_INTERACTIVE FAIR_SLEEPERS_TIMER \
        INTERACTIVE TIMER \
        INTERACTIVE_FORK_EXPEDITED TIMER_FORK_EXPEDITED;

do echo $opt > /sys/debugfs/sched_features;
done

These patches are designed to allow individual enabling of each feature and to make sure that the object size of sched.o does not grow when the features are disabled on a CONFIG_SCHED_DEBUG=n kernel. Optimization of the try_to_wake_up() fast path when features are enabled could be done later by merging some of these features together. This patchset is based on 2.6.35.2.

Feedback is welcome,

Thanks,

Mathieu

Signature · 4 lines
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com