linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/6] blk-mq: generalization and bug fixes for tag allocation
@ 2016-09-17  8:28 Omar Sandoval
  2016-09-17  8:28 ` [PATCH v4 1/6] blk-mq: abstract tag allocation out into sbitmap library Omar Sandoval
                   ` (6 more replies)
  0 siblings, 7 replies; 10+ messages in thread
From: Omar Sandoval @ 2016-09-17  8:28 UTC (permalink / raw)
  To: Jens Axboe, linux-block; +Cc: linux-kernel, kernel-team, Alexei Starovoitov

From: Omar Sandoval <osandov@fb.com>

This is v4 of the patch series to turn blk-mq's scalable tag allocation
into a generic library, fixing a few bugs along the way. This is both
cleanup and preparation for coming blk-mq work.

v1 is here [1], v2 is here [2], v3 is here [3].

Changes in v4:

- Added patch 6 to fix a bug in blk-mq where shrinking the tag set
  doesn't stop allocations from happening to high tags.
- Changed the interface for raw `sbitmap_get()` to pass the allocation
  hint as a value, not a pointer. This pushes the hint updating out into
  `sbitmap_queue_get()` where it makes more sense.

Changes in v3:

- Renamed scale_bitmap to sbitmap

Changes in v2:

- Return -EINVAL instead of BUG_ON() if an invalid shift is passed to
  the initialization functions.
- Rename last_cache to alloc_hint.
- Split the wait queue allocation change into a separate patch. Patch 1
  should now be a no-op.
- Add patches 3 and 4 to make the API cleaner by pushing some context
  from the blk-mq data structures into the common scale_bitmap code.
- Add patch 5 to randomize the allocation hint on initialization like

Applies to v4.8-rc6.

Thanks!

1: http://marc.info/?l=linux-block&m=147251402805405&w=2
2: http://marc.info/?l=linux-block&m=147329198222482&w=2
3: http://marc.info/?l=linux-block&m=147344663202718&w=2

Omar Sandoval (6):
  blk-mq: abstract tag allocation out into sbitmap library
  sbitmap: allocate wait queues on a specific node
  sbitmap: push per-cpu last_tag into sbitmap_queue
  sbitmap: push alloc policy into sbitmap_queue
  sbitmap: randomize initial alloc_hint values
  sbitmap: re-initialize allocation hints after resize

 MAINTAINERS             |   1 +
 block/Kconfig           |   1 +
 block/blk-mq-tag.c      | 503 +++++++++++-------------------------------------
 block/blk-mq-tag.h      |  42 ++--
 block/blk-mq.c          | 114 ++++-------
 block/blk-mq.h          |  11 --
 include/linux/blk-mq.h  |   9 +-
 include/linux/sbitmap.h | 373 +++++++++++++++++++++++++++++++++++
 lib/Kconfig             |   3 +
 lib/Makefile            |   2 +
 lib/sbitmap.c           | 347 +++++++++++++++++++++++++++++++++
 11 files changed, 889 insertions(+), 517 deletions(-)
 create mode 100644 include/linux/sbitmap.h
 create mode 100644 lib/sbitmap.c

-- 
2.9.3


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-09-17 19:40 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-17  8:28 [PATCH v4 0/6] blk-mq: generalization and bug fixes for tag allocation Omar Sandoval
2016-09-17  8:28 ` [PATCH v4 1/6] blk-mq: abstract tag allocation out into sbitmap library Omar Sandoval
2016-09-17  8:28 ` [PATCH v4 2/6] sbitmap: allocate wait queues on a specific node Omar Sandoval
2016-09-17  8:28 ` [PATCH v4 3/6] sbitmap: push per-cpu last_tag into sbitmap_queue Omar Sandoval
2016-09-17  8:28 ` [PATCH v4 4/6] sbitmap: push alloc policy " Omar Sandoval
2016-09-17  8:28 ` [PATCH v4 5/6] sbitmap: randomize initial alloc_hint values Omar Sandoval
2016-09-17  8:28 ` [PATCH v4 6/6] sbitmap: re-initialize allocation hints after resize Omar Sandoval
2016-09-17 14:42 ` [PATCH v4 0/6] blk-mq: generalization and bug fixes for tag allocation Jens Axboe
2016-09-17 19:20   ` [PATCH] sbitmap: don't update the allocation hint on clear after resize Omar Sandoval
2016-09-17 19:39     ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).