Files
Linux/lib
Jens Axboe 9672b0d437 sbitmap: add __sbitmap_queue_get_batch()
The block layer tag allocation batching still calls into sbitmap to get
each tag, but we can improve on that. Add __sbitmap_queue_get_batch(),
which returns a mask of tags all at once, along with an offset for
those tags.

An example return would be 0xff, where bits 0..7 are set, with
tag_offset == 128. The valid tags in this case would be 128..135.

A batch is specific to an individual sbitmap_map, hence it cannot be
larger than that. The requested number of tags is automatically reduced
to the max that can be satisfied with a single map.

On failure, 0 is returned. Caller should fall back to single tag
allocation at that point/

Signed-off-by: Jens Axboe <[email protected]>
2021-10-18 06:17:35 -06:00
..
…
…
…
…
2021-09-08 11:50:26 -07:00
2021-08-12 19:17:00 +08:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2021-08-19 09:02:55 +09:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2021-08-19 09:02:55 +09:00
…
…
…
…
…
…
…
…
…
…
…
2021-08-08 13:00:20 +01:00
2021-09-17 13:52:17 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
2021-08-13 13:19:06 -06:00
…
…
…
…
…