Re: Unserializing ioctl() system calls

From: Andi Kleen
Date: Sat May 22 2004 - 03:07:31 EST


"Spinka, Kristofer" <kspinka@xxxxxxxxx> writes:

> I noticed that even in the 2.6.6 code, callers to ioctl system call
> (sys_ioctl in fs/ioctl.c) are serialized with {lock,unlock}_kernel().
>
> I realize that many kernel modules, and POSIX for that matter, may not
> be ready to make this more concurrent.

POSIX doesn't care how the kernel implements locking.

> I propose adding a flag to indicate that the underlying module would
> like to support its own concurrency management, and thus we avoid
> grabbing the BKL around the f_op->ioctl call.

Better would be probably a unlocked_ioctl() entry point in f_op. Should
be pretty easy to implement.

There is also the additional issue that on 64bit systems with 32bit
userland the ioctl emulation currently relies on the BKL.

-Andi

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