[lkml]   [2007]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Linus 2.6.23-rc1

On Sat, 28 Jul 2007, Linus Torvalds wrote:
> Yes, it's what "/proc/sys/kernel/sched_granularity_ns" is supposed to
> tweak, but maybe there's some misfeature there, or maybe the default is
> just bad for games, or whatever.
> Ingo: that sysctl_sched_granularity initialization doesn't make sense. You
> talk about it being in units of nanoseconds, but then you do
> 2000000000ULL/HZ
> which is nonsensical.

Btw, people who actually have 3D games installed (I have exactly one:
ppracer, and I can't really say that I care about how it feels), if you
don't have CONFIG_HZ=1000, this really is worth testing.

I think Ingo probably ran with CONFIG_NO_HZ and HZ_1000, but the default
timer tick is actually 250Hz, which makes all the default scheduler values
come out four times bigger than they are documented/supposed to be.

On SMP, that scheduler granularity then gets doubled once more if you have
two CPU's, so rather than 2ms by default, it ends up being 16ns (and the
time slices themselves end up being bigger than that).

So doing some testing with a simple

echo 2000000 > /proc/sys/kernel/sched_granularity_ns
echo 1000000 > /proc/sys/kernel/sched_batch_wakeup_granularity_ns
echo 8000000 > /proc/sys/kernel/sched_runtime_limit_ns

might be worth doing (and if you vary numbers to see if it matters,
please do let people know!)

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2007-07-28 23:37    [W:0.176 / U:1.496 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site