Re: BFS vs. mainline scheduler benchmarks and measurements

From: Nikos Chantziaras
Date: Wed Sep 09 2009 - 06:18:08 EST


On 09/09/2009 12:40 PM, Nikos Chantziaras wrote:
On 09/09/2009 12:17 PM, Peter Zijlstra wrote:
On Wed, 2009-09-09 at 12:05 +0300, Nikos Chantziaras wrote:

Thank you for mentioning min_granularity. After:

echo 10000000> /proc/sys/kernel/sched_latency_ns
echo 2000000> /proc/sys/kernel/sched_min_granularity_ns

You might also want to do:

echo 2000000> /proc/sys/kernel/sched_wakeup_granularity_ns

That affects when a newly woken task will preempt an already running
task.

Lowering wakeup_granularity seems to make things worse in an interesting
way:

With low wakeup_granularity, the video itself will start skipping if I
move the window around. However, the window manager's effect of moving a
window around is smooth.

With high wakeup_granularity, the video itself will not skip while
moving the window around. But this time, the window manager's effect of
the window move is skippy.

(I should point out that only with the BFS-patched kernel can I have a
smooth video *and* a smooth window-moving effect at the same time.)
Mainline seems to prioritize one of the two according to whether
wakeup_granularity is raised or lowered. However, I have not tested
Mike's patch yet (but will do so ASAP.)

I've tested Mike's patch and it achieves the same effect as raising sched_min_granularity.

To round it up:

By testing various values for sched_latency_ns, sched_min_granularity_ns and sched_wakeup_granularity_ns, I can achieve three results:

1. Fluid animations for the foreground app, skippy ones for
the rest (video plays nicely, rest of the desktop lags.)

2. Fluid animations for the background apps, a skippy one for
the one in the foreground (dekstop behaves nicely, video lags.)

3. Equally skippy/jerky behavior for all of them.

Unfortunately, a "4. Equally fluid behavior for all of them" cannot be achieved with mainline, unless I missed some other tweak.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/