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 …
more ...

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 …

more ...