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

From: Robert Love
Date: Tue Sep 14 2004 - 14:13:43 EST


On Tue, 2004-09-14 at 11:52 -0700, William Lee Irwin III wrote:

> I'd vaguely prefer to clean up the BKL (ab)users... of course, this
> involves working with some of the dirtiest code in the kernel that's
> already discouraged most/all of those who work on reducing/eliminating
> BKL use from touching it... maybe the latency trend is the final nail
> in the coffin of resistance to cleaning that up, though I agree with
> Alan that we have to be very careful about it, particularly since all
> prior attempts failed to be sufficiently so.

I'd love to just throw away all the BKL users, too, William. But
pragmatism and my cautious sense of reality tells me that the BKL is not
going anywhere anytime soon. We might get it down to 1% of its previous
usage, but it is awful intertwined in some places. It will take some
time.

What I think we can do is start looking at removing the special
properties of the BKL, or at least better containing and documenting
them. The BKL has a few oddities over other spin locks:

- you can safely call schedule() while holding it
- you can grab it recursively
- you cannot use it in interrupt handlers

Getting rid of these, or at least better delineating them, will move the
BKL closer to being just a very granular lock.

cond_resched_bkl() is a step toward that.

I want the BKL gone, too; I think reducing its specialness is a good way
to achieve that. If you can also s/BKL/some other lock/ at the same
time, rock that.

Best,

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/