Re: [patch] sched: fix scheduling latencies for !PREEMPT kernels

From: Robert Love
Date: Tue Sep 14 2004 - 14:38:50 EST


On Tue, 2004-09-14 at 21:25 +0200, Andrea Arcangeli wrote:

Hi, Andrea.

> On Tue, Sep 14, 2004 at 03:02:49PM -0400, Robert Love wrote:
> > - you can safely call schedule() while holding it
> > - you can grab it recursively
> > - you cannot use it in interrupt handlers
>
> the latter won't make it harder to get rid of at least ;)

Indeed. I should not of lumped the last property in with the "things to
get rid of", although it is one of the implicit rules of the BKL.

We probably don't want to actually start disabling interrupts for no
reason when we grab the BKL. ;-)

Although the locks that replace the BKL can certainly be BKL-safe locks.

> yes, I don't think it will make thing worse in respect of dropping the
> bkl, if something it should help.
>
> probably the bkl is still there because removing it won't bring much
> further value to the kernel at runtime, it'd probably only make the
> kernel a bit cleaner and simpler.

I agree. Barring a few worst-case examples, I think the only reason
going forward to reduce the BKL's use is cleanliness and simplicity. It
is rather hard at times to find just what the BKL is locking.

Robert Love


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