Friday, May 20, 2011
Q] Why ioctl() operation is removed form Linux Kernel 2.6.36?
ioctlwas executed, it took the Big Kernel Lock (BKL), so nothing else could execute at the same time. This is very bad on a multiprocessor machine, so there was a big effort to get rid of the BKL. First,
unlocked_ioctlwas introduced. It lets each driver writer choose what lock to use instead. This can be difficult, so there was a period of transition during which old drivers still worked (using
ioctl) but new drivers could use the improved interface (
unlocked_ioctl). Eventually all drivers were converted and
ioctlcould be removed.
compat_ioctlis actually unrelated, even though it was added at the same time. Its purpose is to allow 32-bit userland programs to make
ioctlcalls on a 64-bit kernel. The meaning of the last argument to
ioctldepends on the driver, so there is no way to do a driver-independent conversion