Skip to contentSkip to conversation

Unserializing ioctl() system calls

DISCUSSION Andi Kleen 1 participant 1 message May 22, 2004 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Andi Kleen

author
#1 lore raw
Quoted 5 lines · Kristofer

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.

Quoted 3 lines

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