Re: [announce] "kill the Big Kernel Lock (BKL)" tree

From: Jan Engelhardt
Date: Thu May 15 2008 - 04:45:16 EST



On Wednesday 2008-05-14 23:45, Jonathan Corbet wrote:
>Sez Ingo:
>1: We could add an unlocked_open() to the file_operations structure;
> drivers could be converted over as they are verified not to need the
> BKL on open. Disadvantages are that it grows this structure for a
> relatively rare case - most open() calls already don't need the BKL.
> But it's a relatively easy path without flag days.

1b: add a .locked_open and move all BKL-requiring code to use that.
When time comes and BKL is gone, .locked_open can be removed again,
and no rename was ever done for BKL-free code.

>2: Create a char_dev_ops structure for char devs and use it instead of
> file_operations. I vaguely remember seeing Al mutter about that a
> while back. Quite a while back. This mirrors what was done with
> block devices, and makes some sense - there's a lot of stuff in
> struct file_operations which is not really applicable to char devs.
> Then struct char_dev_ops could have open() and locked_open(), with
> the latter destined for removal sometime around 2015 or so.

Iff you create a new char_dev_ops, don't clutter it with the old stuff.
BKL-using code could continue using file_operations, would not it?

>3: Provide a new form of cdev_add() which lets the driver indicate
> that the BKL is not needed on open (or anything else?). At a

This is the BSD/Solaris tactic, heh :)

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