Re: Preempt of BKL and with tickless systems

From: Ingo Molnar
Date: Mon May 21 2007 - 03:36:21 EST



* Bill Davidsen <davidsen@xxxxxxx> wrote:

> > This was introduced by Ingo to solve a real problem that I found,
> > where some codepath would hold the BKL for long enough to introduce
> > excessive scheduling latencies - search list archive for details.
> > But I don't remember the code path (scrolling the FB console? VT
> > switching? reiser3? misc. ioctl()s?). Basically, taking the BKL
> > disabled preemption which caused long latencies.
> >
> > It's certainly possible that whatever issue led to this was solved
> > in another way since.
>
> Anything is possible. I feel that using voluntary + bkl is probably
> good for most servers, forced preempt for desktop, although it really
> doesn't seem to do much beyond voluntary.

yeah - we default to PREEMPT_BKL on plain SMP kernels, so it's enabled
on the majority of enterprise distros and it's working pretty well in
practice.

even today there are a couple of bad BKL latencies still: Lee mentioned
ioctls and reiser3 - neither has been fixed since i wrote
CONFIG_PREEMPT_BKL two years ago. Turning the BKL into a semaphore does
not reduce BKL latencies itself, but it makes all _other_ workloads
schedule sanely and without delay. With PREEMPT_BKL disabled (which
turns on the big kernel spinlock again) any big BKL delay is immediately
felt by other tasks too, because we waste that CPU time spinning on the
big kernel spinlock.

Ingo
-
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/