explicit on-stack per-task plugging
- 末节的 Discussion 很精彩,大神 Neil Brown 答疑解惑
- A block layer introduction part 1: the bio layer, Neil Brown, October 25, 2017, lwn.net
- Explicit block device plugging, Jens Axboe, April 13, 2011, lwn.net
- No more global unplugging, corbet, March 10, 2004, lwn.net
plugging 进化
-
global plugging/unplugging : performance …
lock_stat
LOCK STATISTICS
WHAT
As the name suggests, it provides statistics on locks.
WHY
Because things like lock contention can severely impact performance.
HOW
Lockdep already has hooks in the lock functions and maps lock instances to lock classes. We build on that (see Documentation/locking/lockdep-design.txt). The …
more ...lockdep-design
Runtime locking correctness validator
Lock-class
The basic object the validator operates upon is a 'class' of locks.
A class of locks is a group of locks that are logically the same with respect to locking rules, even if the locks may have multiple (possibly tens of thousands of …
more ...virtualbox-5.2.24 dkms build failed against x86_32 kernel 5.1.0-rc1+
kernel 5.1 相比 5.0 又发生了新的变化,导致 virtualbox-5.2.24 的编译又失败了,是 2 个 commit 引起的变化:
- commit 746c9398f5ac2b3f5730da4ed09e99ef4bb50b4a
arch: move common mmap flags to linux/mman.h
...
- commit 736706bee3298208343a76096370e4f6a5c55915
get rid of legacy 'get_ds()' function
...
解决方法是修改 /usr/src/virtualbox-5.2.24/r0drv/linux/the-linux-kernel.h
#include <asm/mman.h …
lockdep-design of v2.6.18-rc1
Runtime locking correctness validator
Lock-class
The basic object the validator operates upon is a 'class' of locks.
A class of locks is a group of locks that are logically the same with respect to locking rules, even if the locks may have multiple (possibly tens of thousands of …
more ...sbitmap & sbitmap_queue & sbq_wait
struct sbitmap - scalable bitmap
A &struct sbitmap is spread over multiple cachelines to avoid ping-pong. This trades off higher memory usage for better scalability 最浪费空间的情况是 1 bit per cacheline.
There are depth / bits_per_word full words and depth % bits_per_word bits left over. In bitwise arithmetic:
bits_per_word = 1 …
blk-mq: new multi-queue block IO queueing mechanism
Linux currently has two models for block devices:
-
The classic request_fn based approach, where drivers use struct request units for IO. The block layer provides various helper functionalities to let drivers share code, things like tag management, timeout handling, queueing, etc.
-
The "stacked …
[转载] blktrace 分析 IO
前言
上篇博客介绍了 iostat 的一些输出,这篇介绍 blktrace 这个神器。上一节介绍 iostat 的时候,我们心心念念希望得到块设备处理 io 的 service time,而不是 service time + wait time,因为对于评估一个磁盘或者云磁盘而言,service time 才是衡量磁盘性能的核心指标和直接指标。很不幸 iostat 无法提供这个指标,但是 blktrace 可以。
blktrace 是一柄神器,很多工具都是基于该神器的:ioprof、seekwatcher、iowatcher,这个工具基本可以满足我们的对块设备请求的所有了解。
blktrace 的原理
一个 I/O 请求,从应用层到底层块设备,路径如下图所示 …
more ...[转载] 使用 blktrace 统计磁盘块 IO 访问频率
如果我们想知道,在一段时间内,那一个磁盘块被读写的频率最高,怎么办?我问这个问题是看到 taobao kernel wiki 上面有这么一段话,看了我十分心痒:
通过对 blktrace 的输出结果进行分析,我们可以对特定时间段内发生的
读、写操作的磁盘块进行 I/O 频次统计。结合通过将磁盘块 I/O 频度统计和
page cache 命中率统计相结合,就可以比较有效的判断服务器节点的 cache
使用效率。通过这套工具,CDN 系统修正了一个固态硬盘上 cache 管理的缺陷,
显著提高了I/O性能(详细信息)
淘宝大神给了一个 …
more ...[转载] Debugging disk issues with blktrace, blkparse, btrace and btt in Linux environment
blktrace is a block layer IO tracing mechanism which provides detailed information about request queue operations up to user space. There are three major components: a kernel component, a utility to record the i/o trace information …
more ...