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