fio HOWTO (2) Job file format

fio accepts one or more job files describing what it is supposed to do.

The job file format is the classic ini file, where the names enclosed in [] brackets define the job name. You are free to use any ASCII name you want, except global which has special …

more ...

fio HOWTO (1) command line options

How fio works

The first step in getting fio to simulate a desired I/O workload, is writing a job file describing that specific setup.

A job file may contain any number of threads and/or files -- the typical contents of the job file is a global section …

more ...

F2FS: A New File System for Flash Storage


single queue VS multiqueue


dm-bufio

可以理解为 device-mapper framework 自己实现的简单 buf 库(dm 喜欢自己封装提供自己的 API 接口,这样的好处是可以隐藏 block layer 的一些变动,不好的地方是熟悉这些 API 需要时间,好在实现简洁易懂,实际中用到的时候可以方便查看实现细节),可以看作是 dm 的 malloc 库,dm_bufio_client 看作 buf pool 的句柄,dm_buffer 看作 pool 中单个 buf 句柄。用户有了这些句柄之后,就可以读写数据到 buf;与 malloc 不同的是,dm-bufio …

more ...

struct target_type

系统中注册的 target_type 都链入 static LIST_HEAD(_targets)

int dm_register_target(struct target_type *tt) 向系统中注册 target_type,如果之前已经注册过了则返回 -EEXIST,否则成功注册并返回 0

void dm_unregister_target(struct target_type *tt) 从系统中注销 target_type,如果之前没有注册过,则报错 Unregistering unrecognised target: <target_type->name>BUG(),否则移出 static LIST_HEAD(_targets)

int dm_target_iterate …

more ...

lsblk - list information about block devices

The lsblk command is part of the util-linux package. lsblk lists information about all available or the specified block devices. The lsblk command reads the sysfs …

more ...

Concurrency Managed Workqueue (cmwq)

Whenever a driver or subsystem wants a function to be executed asynchronously it has to set up a work item pointing to that function and queue that work item on a workqueue.

There are many cases where an asynchronous process execution context is needed and …

more ...

atomic_xchg & atomic_cmpxchg

If someone wants to use xchg(), cmpxchg() and their variants, linux/atomic.h should be included rather than asm/cmpxchg.h, unless the code is in arch/* and can take care of itself.

    "compare and swap" atomically:
        1) Compares "old" with the value currently at …
more ...

kcopyd

kcopyd 提供的是一个易于使用的接口,隐藏了异步:dm-kcopyd.c 重点在于 "d",即对 kcopyd_jobs 的异步管理,而 copy 相关的具体 async IO 细节在 dm-io.c 中实现

kcopyd provides the ability to copy a range of sectors from one block-device to one or more other block-devices, with …

more ...