summaryrefslogtreecommitdiffstats
path: root/include/linux/sbitmap.h
Commit message (Collapse)AuthorAgeFilesLines
* sbitmap: add helpers for dumping to a seq_fileOmar Sandoval2017-01-271-0/+30
| | | | | | | | | | | | This is useful debugging information that will be used in the blk-mq debugfs directory. Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Omar Sandoval <osandov@fb.com> Changed 'weight' to 'busy'. Signed-off-by: Jens Axboe <axboe@fb.com>
* sbitmap: push alloc policy into sbitmap_queueOmar Sandoval2016-09-171-8/+11
| | | | | | | | Again, there's no point in passing this in every time. Make it part of struct sbitmap_queue and clean up the API. Signed-off-by: Omar Sandoval <osandov@fb.com> Signed-off-by: Jens Axboe <axboe@fb.com>
* sbitmap: push per-cpu last_tag into sbitmap_queueOmar Sandoval2016-09-171-1/+44
| | | | | | | | | | Allocating your own per-cpu allocation hint separately makes for an awkward API. Instead, allocate the per-cpu hint as part of the struct sbitmap_queue. There's no point for a struct sbitmap_queue without the cache, but you can still use a bare struct sbitmap. Signed-off-by: Omar Sandoval <osandov@fb.com> Signed-off-by: Jens Axboe <axboe@fb.com>
* blk-mq: abstract tag allocation out into sbitmap libraryOmar Sandoval2016-09-171-0/+327
This is a generally useful data structure, so make it available to anyone else who might want to use it. It's also a nice cleanup separating the allocation logic from the rest of the tag handling logic. The code is behind a new Kconfig option, CONFIG_SBITMAP, which is only selected by CONFIG_BLOCK for now. This should be a complete noop functionality-wise. Signed-off-by: Omar Sandoval <osandov@fb.com> Signed-off-by: Jens Axboe <axboe@fb.com>
OpenPOWER on IntegriCloud