合集-翻译2

摘要:https://www.kernel.org/doc/html/v6.6/core-api/local_ops.html 这篇文档介绍了本地原子操作的语义和行为,以及如何在任何给定的架构中实现它们,并展示了它们如何被正确地使用。它还强调了在读取这些本地变量时必须采取的预防措施,特别是当内存写入的顺序 阅读全文
posted @ 2023-12-09 19:56 dolinux 阅读(43) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/core-api/kref.html 为内核对象添加引用计数器(krefs) 作者 Corey Minyard minyard@acm.org 作者 Thomas Hellstrom thellstrom@vmware.com 阅读全文
posted @ 2023-12-09 20:08 dolinux 阅读(155) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/core-api/this_cpu_ops.html 作者 Christoph Lameter,2014年8月4日 作者 Pranith Kumar,2014年8月2日 this_cpu操作是一种优化访问与当前执行处理器相关的 阅读全文
posted @ 2023-12-09 20:18 dolinux 阅读(151) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/core-api/circular-buffers.html 循环缓冲区 作者: David Howells dhowells@redhat.com Paul E. McKenney paulmck@linux.ibm.com 阅读全文
posted @ 2023-12-09 20:22 dolinux 阅读(84) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/core-api/rbtree.html 红黑树(rbtree)在Linux中 日期 2007年1月18日 作者 Rob Landley rob@landley.net 红黑树是什么,它们有什么作用? 红黑树是一种自平衡的二叉 阅读全文
posted @ 2023-12-09 20:27 dolinux 阅读(173) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/core-api/packing.html 通用位字段打包和解包函数 问题陈述 在处理硬件时,人们必须在几种接口方式之间进行选择。可以将指针内存映射到硬件设备的内存区域上,并将其字段作为结构体成员(可能声明为位字段)进行访问。 阅读全文
posted @ 2023-12-09 20:31 dolinux 阅读(24) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/RCU/index.html RCU概念 RCU补丁的审查清单 RCU和lockdep检查 Lockdep-RCU Splat RCU和可卸载模块 卸载使用call_rcu()的模块 rcu_barrier() 实现rcu_b 阅读全文
posted @ 2023-12-09 20:40 dolinux 阅读(96) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/core-api/genericirq.html Linux通用中断处理 版权 © 2005-2010:Thomas Gleixner © 2005-2006:Ingo Molnar 简介 通用中断处理层旨在为设备驱动程序提供 阅读全文
posted @ 2023-12-09 20:45 dolinux 阅读(56) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/RCU/checklist.html RCU补丁审查清单 本文档包含了一个用于生成和审查使用RCU的补丁的清单。违反以下列出的任何规则都会导致与省略锁原语相同类型的问题。这份清单基于审查这类补丁的经验,经历了相当长的一段时间, 阅读全文
posted @ 2023-12-09 21:00 dolinux 阅读(99) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/admin-guide/cgroup-v1/cgroups.html 控制组 由Paul Menage menage@google.com编写,基于CPUSETS 来自CPUSETS的原始版权声明: 部分版权所有(C)2004 阅读全文
posted @ 2023-12-09 21:32 dolinux 阅读(87) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/admin-guide/cgroup-v1/blkio-controller.html Block IO 控制器 概述 cgroup 子系统 "blkio" 实现了块 IO 控制器。在存储层次结构中,似乎需要各种类型的 IO 阅读全文
posted @ 2023-12-09 21:36 dolinux 阅读(353) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/admin-guide/cgroup-v1/cpusets.html CPUSETS 1. Cpusets 1.1 什么是 cpusets? Cpusets 提供了一种机制,用于将一组 CPU 和内存节点分配给一组任务。在本文 阅读全文
posted @ 2023-12-09 21:49 dolinux 阅读(305) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/admin-guide/cgroup-v1/devices.html 设备白名单控制器 1. 描述 实现一个 cgroup 来跟踪和强制设备文件的打开和 mknod 限制。设备 cgroup 将设备访问白名单与每个 cgrou 阅读全文
posted @ 2023-12-09 21:52 dolinux 阅读(85) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/admin-guide/cgroup-v1/freezer-subsystem.html Cgroup Freezer cgroup冷冻器对于批处理作业管理系统非常有用,该系统可以启动和停止一组任务,以便根据系统管理员的需求安 阅读全文
posted @ 2023-12-09 21:53 dolinux 阅读(149) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/admin-guide/cgroup-v1/hugetlb.html HugeTLB 控制器 HugeTLB 控制器可以通过首先挂载 cgroup 文件系统来创建。 # mount -t cgroup -o hugetlb n 阅读全文
posted @ 2023-12-09 21:55 dolinux 阅读(120) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/admin-guide/cgroup-v1/memcg_test.html Memory Resource Controller(Memcg) Implementation Memo 最后更新时间:2010/2 基础内核版本: 阅读全文
posted @ 2023-12-09 22:14 dolinux 阅读(94) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/admin-guide/cgroup-v1/net_cls.html 网络分类器 cgroup 网络分类器 cgroup 提供了一个接口,用于给网络数据包打上一个类别标识符(classid)。 流量控制器(tc)可以用来为来自 阅读全文
posted @ 2023-12-09 22:17 dolinux 阅读(121) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/admin-guide/cgroup-v1/net_prio.html 网络优先级cgroup 网络优先级cgroup提供了一个接口,允许管理员动态设置由各种应用程序生成的网络流量的优先级。 通常情况下,应用程序会通过SO_P 阅读全文
posted @ 2023-12-09 22:19 dolinux 阅读(75) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/admin-guide/cgroup-v1/pids.html 进程数量控制器 摘要 进程数量控制器用于允许 cgroup 层次结构在达到一定限制后阻止任何新任务进行 fork() 或 clone()。 由于很容易达到任务限制 阅读全文
posted @ 2023-12-09 22:20 dolinux 阅读(43) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/admin-guide/cgroup-v1/rdma.html RDMA 控制器 1. 概述 1-1. 什么是 RDMA 控制器? RDMA 控制器允许用户限制给定一组进程可以使用的 RDMA/IB 特定资源。这些进程是使用 阅读全文
posted @ 2023-12-09 22:21 dolinux 阅读(94) 评论(0) 推荐(0)
摘要:原文: https://www.kernel.org/doc/html/latest/locking/index.html 锁定 锁类型及其规则 运行时锁正确性验证器 锁统计信息 内核锁折磨测试操作 通用互斥子系统 实时互斥锁实现设计 带有PI支持的实时互斥锁子系统 序列计数器和顺序锁 锁定教训 无 阅读全文
posted @ 2023-12-10 08:50 dolinux 阅读(18) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/latest/locking/locktypes.html 锁类型及其规则 介绍 内核提供了各种锁原语,可以分为三类: 睡眠锁 CPU 本地锁 自旋锁 本文概念上描述了这些锁类型,并提供了它们的嵌套规则,包括在 PREEMPT_RT 下 阅读全文
posted @ 2023-12-10 09:05 dolinux 阅读(201) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/locking/lockdep-design.html 锁类 该验证器操作的基本对象是“锁”的“类”。 “锁”的“类”是一组逻辑上相同的锁,即使这些锁可能有多个(可能有成千上万个)实例化。例如,inode结构中的锁是一个类,而 阅读全文
posted @ 2023-12-10 10:02 dolinux 阅读(151) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/locking/lockstat.html 锁统计 什么 顾名思义,它提供了有关锁的统计信息。 为什么 因为诸如锁争用之类的问题会严重影响性能。 如何 Lockdep已经在锁函数中设置了钩子,并将锁实例映射到锁类上。我们在此基 阅读全文
posted @ 2023-12-10 10:10 dolinux 阅读(118) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/locking/mutex-design.html 通用互斥子系统 由Ingo Molnar mingo@redhat.com发起 由Davidlohr Bueso davidlohr@hp.com更新 互斥锁是什么? 在Li 阅读全文
posted @ 2023-12-10 10:24 dolinux 阅读(70) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/locking/rt-mutex-design.html RT-mutex 实现设计 版权所有 (c) 2006 Steven Rostedt 根据 GNU 自由文档许可证第 1.2 版许可 本文档试图描述 rtmutex.c 阅读全文
posted @ 2023-12-10 10:33 dolinux 阅读(146) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/locking/rt-mutex.html RT-mutex子系统支持PI RT-mutexes与优先级继承一起使用,以支持PI-futexes,从而使pthread_mutex_t支持优先级继承属性(PTHREAD_PRIO 阅读全文
posted @ 2023-12-10 11:35 dolinux 阅读(184) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/locking/seqlock.html# 序列计数器和顺序锁 介绍 序列计数器是一种具有无锁读取器(只读重试循环)和无写入者饥饿的读者-写者一致性机制。它们用于很少写入数据的情况(例如系统时间),其中读者希望获得一致的信息集 阅读全文
posted @ 2023-12-10 11:41 dolinux 阅读(108) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/locking/spinlocks.html 锁定课程 课程1:自旋锁 用于锁定的最基本原语是自旋锁: static DEFINE_SPINLOCK(xxx_lock); unsigned long flags; spin_l 阅读全文
posted @ 2023-12-10 11:43 dolinux 阅读(30) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/locking/ww-mutex-design.html Wound/Wait死锁安全的互斥锁设计 请先阅读通用互斥锁子系统,因为它也适用于等待/伤害互斥锁。 WW-互斥锁的动机 GPU执行的操作通常涉及许多缓冲区。这些缓冲区 阅读全文
posted @ 2023-12-10 11:54 dolinux 阅读(247) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/locking/preempt-locking.html 在可抢占内核下的适当锁定:保持内核代码的可抢占安全 作者 Robert Love rml@tech9.net 介绍 可抢占内核会引发新的锁定问题。这些问题与SMP下的问 阅读全文
posted @ 2023-12-10 11:58 dolinux 阅读(53) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/locking/percpu-rw-semaphore.html "Percpu rw semaphores" 是一种新的读写信号量设计,针对读取操作进行了优化。 传统的读写信号量存在一个问题,即当多个核心获取读取锁时,包含信 阅读全文
posted @ 2023-12-10 12:35 dolinux 阅读(179) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/locking/hwspinlock.html 硬件自旋锁框架 简介 硬件自旋锁模块为异构处理器和不在单一共享操作系统下运行的处理器之间的同步和互斥提供硬件辅助。 例如,OMAP4具有双核Cortex-A9、双核Cortex- 阅读全文
posted @ 2023-12-10 12:44 dolinux 阅读(341) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/driver-api/driver-model/index.html Driver Model(驱动程序模型) Driver Binding(驱动绑定) Bus Types(总线类型) Device Driver Design 阅读全文
posted @ 2023-12-10 12:48 dolinux 阅读(23) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/driver-api/driver-model/binding.html 驱动绑定 驱动绑定是将设备与能够控制它的设备驱动程序关联起来的过程。通常由总线驱动程序处理这一过程,因为总线特定的结构用于表示设备和驱动程序。使用通用设 阅读全文
posted @ 2023-12-10 12:51 dolinux 阅读(26) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/driver-api/driver-model/bus.html 总线类型 定义 请参阅结构体bus_type的内核文档。 int bus_register(struct bus_type * bus); 声明 内核中的每个总 阅读全文
posted @ 2023-12-10 12:55 dolinux 阅读(49) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/driver-api/driver-model/design-patterns.html 设备驱动设计模式 这份文档描述了设备驱动中常见的设计模式。子系统维护者可能会要求驱动开发者遵循这些设计模式。 状态容器 containe 阅读全文
posted @ 2023-12-10 12:56 dolinux 阅读(47) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/driver-api/driver-model/device.html 设备基本结构 请参阅内核文档以了解 struct device 的结构。 编程接口 发现设备的总线驱动程序使用以下方法将设备注册到核心: int devi 阅读全文
posted @ 2023-12-10 12:59 dolinux 阅读(71) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/driver-api/driver-model/devres.html Devres - 管理设备资源 Tejun Heo teheo@suse.de 首稿日期:2007年1月10日 1. 简介 在尝试将libata转换为使用 阅读全文
posted @ 2023-12-10 13:04 dolinux 阅读(115) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/driver-api/driver-model/driver.html 设备驱动程序 请参阅结构体device_driver的kerneldoc。 分配 设备驱动程序是静态分配的结构。尽管系统中可能有多个驱动程序支持的设备,但 阅读全文
posted @ 2023-12-10 13:17 dolinux 阅读(59) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/driver-api/driver-model/platform.html 平台设备和驱动程序 请参阅<linux/platform_device.h>以获取与平台总线的驱动程序模型接口相关的信息:platform_devic 阅读全文
posted @ 2023-12-10 13:50 dolinux 阅读(71) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/driver-api/driver-model/porting.html 将驱动程序移植到新的驱动模型 Patrick Mochel 2003年1月7日 概述 请参阅Documentation/driver-api/drive 阅读全文
posted @ 2023-12-10 14:02 dolinux 阅读(33) 评论(0) 推荐(0)
摘要:原文: https://www.kernel.org/doc/html/v6.6/driver-api/basics.html#reference-counting 驱动程序的进入和退出点 驱动程序设备表 延迟和调度例程 时间和定时器例程 高分辨率定时器 等待队列和唤醒事件 内部函数 引用计数 原子 阅读全文
posted @ 2023-12-10 14:10 dolinux 阅读(15) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/driver-api/infrastructure.html# 基本设备驱动程序模型结构 设备驱动程序基础 设备驱动程序DMA管理 设备驱动程序即插即用支持 用户空间IO设备 阅读全文
posted @ 2023-12-10 14:17 dolinux 阅读(24) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/driver-api/ioctl.html ioctl基于接口 ioctl()是应用程序与设备驱动程序进行接口交互的最常见方式。它灵活且易于通过添加新命令进行扩展,并且可以通过字符设备、块设备以及套接字和其他特殊文件描述符进行 阅读全文
posted @ 2023-12-10 14:30 dolinux 阅读(189) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/driver-api/dma-buf.html# DMA-BUF缓冲区共享和同步 DMA-BUF子系统提供了一个框架,用于在多个设备驱动程序和子系统之间共享硬件(DMA)访问的缓冲区,并用于同步异步硬件访问。 例如,drm的“ 阅读全文
posted @ 2023-12-10 14:39 dolinux 阅读(2786) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/driver-api/device_link.html 默认情况下,驱动核心仅强制执行设备之间的依赖关系,这些依赖关系源自设备层次结构中的父/子关系:在挂起、恢复或关闭系统时,设备的顺序是基于这种关系的,即子设备总是在其父设备 阅读全文
posted @ 2023-12-10 14:50 dolinux 阅读(216) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/filesystems/ramfs-rootfs-initramfs.html Ramfs、rootfs和initramfs 作者 Rob Landley rob@landley.net 什么是ramfs? Ramfs是一个非 阅读全文
posted @ 2023-12-10 18:34 dolinux 阅读(695) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/driver-api/pin-control.html PINCTRL(PIN CONTROL)子系统 本文概述了Linux中的pin control子系统。 该子系统涉及以下内容: 枚举和命名可控制的引脚 引脚、Pads、F 阅读全文
posted @ 2023-12-10 19:29 dolinux 阅读(374) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/driver-api/phy/phy.html PHY子系统 作者 Kishon Vijay Abraham I kishon@ti.com 本文档解释了通用PHY框架以及提供的API,以及如何使用。 简介 PHY是物理层的缩 阅读全文
posted @ 2023-12-10 19:33 dolinux 阅读(367) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/driver-api/pwm.html Linux PWM接口概述 PWM(脉冲宽度调制)接口用于控制LED、风扇或手机中的振动器。具有固定目的的PWM无需实现Linux PWM API(尽管它们可以)。然而,在SoC上通常会 阅读全文
posted @ 2023-12-10 19:35 dolinux 阅读(525) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/driver-api/sync_file.html Sync File API Guide 本文档旨在为设备驱动程序编写者提供有关sync_file API的指南,以及驱动程序如何支持它。Sync file是需要在驱动程序之间 阅读全文
posted @ 2023-12-10 19:39 dolinux 阅读(294) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/driver-api/vfio.html# VFIO - "虚拟功能 I/O" [1] 许多现代系统现在提供 DMA 和中断重映射功能,以帮助确保 I/O 设备在它们被分配的边界内运行。这包括具有 AMD-Vi 和 Intel 阅读全文
posted @ 2023-12-10 19:56 dolinux 阅读(392) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/driver-api/vfio-mediated-device.html VFIO中介设备 版权 © 2016,NVIDIA CORPORATION。保留所有权利。 作者 Neo Jia cjia@nvidia.com Kir 阅读全文
posted @ 2023-12-10 19:58 dolinux 阅读(80) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/driver-api/clk.html#the-common-clk-framework Common Clk Framework 作者 Mike Turquette mturquette@ti.com 本文旨在解释通用时钟框 阅读全文
posted @ 2023-12-10 20:03 dolinux 阅读(100) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/driver-api/device-io.html Bus-Independent Device Accesses 作者 Matthew Wilcox 作者 Alan Cox 介绍 Linux提供了一个API,它抽象了在所有总 阅读全文
posted @ 2023-12-10 20:20 dolinux 阅读(430) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/filesystems/autofs.html autofs - 工作原理 目的 autofs 的目标是提供按需挂载和无竞争的自动卸载各种其他文件系统。这提供了两个关键优势: 无需延迟引导,直到所有可能需要的文件系统都被挂载。 阅读全文
posted @ 2023-12-10 20:32 dolinux 阅读(356) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/filesystems/sysfs.html sysfs - _用于导出内核对象的_文件系统 Patrick Mochel mochel@osdl.org Mike Murphy mamurph@cs.clemson.edu 阅读全文
posted @ 2023-12-10 20:41 dolinux 阅读(191) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/filesystems/fuse.html FUSE 定义 用户空间文件系统: 普通用户空间进程提供数据和元数据的文件系统。文件系统可以通过内核接口正常访问。 文件系统守护进程: 提供文件系统数据和元数据的进程。 非特权挂载( 阅读全文
posted @ 2023-12-10 20:55 dolinux 阅读(776) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/filesystems/proc.html /proc文件系统 /proc/sys 作者:Terrehon Bowden terrehon@pacbell.net, Bodo Bauer bb@ricochet.net 日期: 阅读全文
posted @ 2023-12-10 23:17 dolinux 阅读(591) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/fb/deferred_io.html 延迟IO 延迟IO是一种延迟和重新分配IO的方法。它使用主机内存作为缓冲区,并使用MMU页错误作为执行设备IO的预触发器。以下示例可能是对这种设置如何工作的有用解释: 用户空间应用程序( 阅读全文
posted @ 2023-12-10 23:25 dolinux 阅读(55) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/livepatch/index.html 动态补丁 (取消)补丁回调 原子替换和累积补丁 动态补丁模块的ELF格式 影子变量 系统状态变化 可靠的堆栈跟踪 动态补丁API 阅读全文
posted @ 2023-12-10 23:27 dolinux 阅读(28) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/staging/static-keys.html#static-keys 静态键 警告 已弃用的API: 直接使用'struct static_key'现在已经被弃用。此外,static_key_{true,false}()也 阅读全文
posted @ 2023-12-11 11:54 dolinux 阅读(186) 评论(0) 推荐(0)
摘要:https://www.kernel.org/doc/html/v6.6/driver-api/gpio/index.html#general-purpose-input-output-gpio 通用目的输入/输出(GPIO) 简介 GPIO接口 什么是GPIO? 常见的GPIO属性 在Linux中 阅读全文
posted @ 2023-12-11 15:33 dolinux 阅读(46) 评论(0) 推荐(0)