[lkml]   [2001]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Moving BKL from generic code into drivers

On Tue, 4 Dec 2001, David C. Hansen wrote:

> As a first step toward removing the BKL from some block device drivers,
> I'm planning on moving the BKL out of the generic code and into the
> drivers themselves.
> I plan on doing this indiscriminately. All block devices will have a
> lock_kernel() at the top of their open() and an unlock_kernel() at the
> bottom. Later on, we can remove it from individual drivers as we see fit.
> Now the big question:
> In block_dev.c:do_open(), the BKL is held in addition to bdev->bd_sem.
> Why is the BKL held here, other than to protect all of the drivers' open
> functions? What doesn't the semaphore provide?

get_blkfops() and module {un,}loading.

Please, don't step into that mess right now - there's a bunch of bad races
in devfs-related side of ->bd_op handling and the last thing we need is
additional set of complications.

Naive fix won't work due to devfs mess and correct one will take serious
massage of generic code _and_ devfs.

Besides, for block devices ->open() and ->release() are absolutely not
interesting wrt BKL contention. Just how often are they called?

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: 2005-03-22 13:18    [W:0.051 / U:2.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site