Meta-answer: All the raw stuff happening to the Linux kernel goes through lkml (the Linux kernel mailing list). For explicative summaries, read or search lwn (Linux weekly news).

Answer: From The new way of ioctl() by Jonathan Corbet:

ioctl() is one of the remaining parts of the kernel which runs under the Big Kernel Lock (BKL). In the past, the usage of the BKL has made it possible for long-running ioctl() methods to create long latencies for unrelated processes.

Follows an explanation of the patch that introduced unlocked_ioctl and compat_ioctl into 2.6.11. The removal of the ioctl field happened a lot later, in 2.6.36.

Explanation: When ioctl was 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_ioctl was 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 ioctl could be removed.

compat_ioctl is actually unrelated, even though it was added at the same time. Its purpose is to allow 32-bit userland programs to make ioctl calls on a 64-bit kernel. The meaning of the last argument to ioctl depends on the driver, so there is no way to do a driver-independent conversion.

The difference among ioctl, unlocked_ioctl and compat_ioctl (RT)的更多相关文章

  1. unlocked_ioctl和compat_ioctl

    参考: https://www.cnblogs.com/super119/archive/2012/12/03/2799967.html https://lwn.net/Articles/119652 ...

  2. Linux Device Driver 3th 中的一些坑

    linux设备驱动第三版由于年代比较久远,有很多东西已过时.开一贴记录自己发现的一些问题. 4.3.1.4. seq_file接口 此节最后提到用 struct proc_dir_entry* cre ...

  3. ioctl,unlocked_ioctl 处理方法

    kernel 2.6.35 及之前的版本中struct file_operations 一共有3个ioctl : ioctl,unlocked_ioctl和compat_ioctl 现在只有unloc ...

  4. [虚拟化/云] kvm的架构分析

    预备知识 1. 客户机物理页框到宿主机虚拟地址转换 http://blog.csdn.net/zhuriyuxiao/article/details/8968781 http://www.tuicoo ...

  5. 手把手教Linux驱动3-之字符设备架构详解,有这篇就够了

    一.Linux设备分类 Linux系统为了管理方便,将设备分成三种基本类型: 字符设备 块设备 网络设备 字符设备: 字符(char)设备是个能够像字节流(类似文件)一样被访问的设备,由字符设备驱动程 ...

  6. nvme ioctl解密

    对于Nvme SSD,我们有的时候会用到ioctl系统调用,该调用的流程是怎样的呢? 首先,在注册nvme设备的时候,会初始化该设备的注册了file operations: static const ...

  7. 字符设备驱动之Led驱动学习记录

    一.概述 Linux内核就是由各种驱动组成的,内核源码中大约有85%的各种渠道程序的代码.一般来说,编写Linux设备驱动大致流程如下: 1.查看原理图,数据手册,了解设备的操作方法. 2.在内核中找 ...

  8. Smart210学习记录-------Linux设备驱动结构

    cdev结构体 1 struct cdev { 2 struct kobject kobj; /* 内嵌的 kobject 对象 */ 3 struct module *owner; /*所属模块*/ ...

  9. [tty与uart]1.Linux中tty框架与uart框架之间的调用关系剖析

    转自:http://developer.51cto.com/art/201209/357501_all.htm 目录 1.tty框架 2.uart框架 3.自底向上 4.自顶向下 5.关系图 在这期间 ...

随机推荐

  1. 软件设计基础-C/S系统

    在软件设计开发过程中,逐渐形成了一些针对特定应用领域的软件系统组织方式的惯用模式 如经典的C/S(client/server,客户/服务器)模式和B/S(browser/server,浏览器/服务器) ...

  2. linux系统安装mysql详细配置

    参考文章https://baijiahao.baidu.com/s?id=1584072431498789934&wfr=spider&for=pc https://www.5yun. ...

  3. Array和ArrayList有什么区别?

    Array和ArrayList的区别: 1.Array可以包含基本数据类型和对象类型,而ArrayList只能包含对象类型 2.Array有固定的大小,而ArrayList是动态变化的. 3.Arra ...

  4. day73 母版 中间件

    关于母版自定义的问题 模板引擎: 基本实用{{k1}}  if  for  在页面传参数 并判断  通过母版进行交互 一 模板中自定义函数:操作步骤 1在已经注册的App中创建一个名字叫templat ...

  5. 记一次ios加急上架经历

    https://developer.apple.com//contact/app-store/?topic=expedite app迭代版本上架之前一直好好的没报错,没crash,但是有一次加急上架, ...

  6. 用户访一个APP或者网页流程示意图

    用户访问示意图:

  7. CentOS安装JDK9

    1.使用XShell将下载好的jdk-9.0.1_linux-x64_bin.tar.gz包上传到/opt/下 2.解压文件 $ tar -zxvf jdk-9.0.1_linux-x64_bin.t ...

  8. endnote插入文献的一些问题

    1. 文末参考文献前面加上序号 eg.[1] 设置如下图,参考网址https://zhidao.baidu.com/question/360201207639069172.html edit-> ...

  9. 最长可重区间集 spfa费用流

    给定实直线L上的n个开区间,和一个正整数k 选取若干个区间,在保证实直线L上的任意一个点最多被选出区间覆盖k次的情况下,使得这些区间的长度和最大 先把区间按照左端点排序, 考虑到重复其实就代表着相交, ...

  10. pycharm远程服务器进行调试

    背景是这样的:我有一台远程的服务器,以及一台本地的电脑:现在我想用远程的服务器上的python编译器来运行代码,怎么办?通用的做法是ssh服务器,vim代码,之后python运行文件,但是如果遇到调试 ...