Re: [GIT, RFC] Killing the Big Kernel Lock

From: Arnd Bergmann
Date: Wed Mar 24 2010 - 18:00:11 EST


On Wednesday 24 March 2010 22:53:07 Roland Dreier wrote:
> Interesting work. For the drivers/infiniband part, it seems maybe all
> these drivers should be using no_llseek instead of default_llseek? (or
> is it better style to use nonseekable_open()?) Certainly as far as I
> can tell, nothing in drivers/infiniband pays any attention to f_pos.

no_llseek makes it clear that you don't want the default_llseek semantics,
while nonseekable_open also prevents pread/pwrite. Ideally, I'd just
use both.

There is a small chance that a random user space application actually tries
to seek on the device (e.g. SEEK_END) and expects a zero return value,
so when in doubt, I converted everything to default_llseek instead of
no_llseek, just so I can be sure I don't change the semantics.

> Also, is there a reason why you add "#include <linux/smp_lock.h>" to all
> the files where you also do ".llseek = default_llseek"?

The last patch in the series moves the default_llseek and default_ioctl
function into the same loadable module that contains the BKL itself.
Moving the declarations into the respective header seemed appropriate,
but it could also stay in a VFS header if people prefer that.

> In any case I can at least take care of the llseek stuff for 2.6.35.

Ok, thanks!

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