linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/5] blk-mq: abstract tag allocation out into scale_bitmap library
@ 2016-09-07 23:46 Omar Sandoval
  2016-09-07 23:46 ` [PATCH v2 1/5] " Omar Sandoval
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Omar Sandoval @ 2016-09-07 23:46 UTC (permalink / raw)
  To: Jens Axboe, linux-block; +Cc: linux-kernel, kernel-team

From: Omar Sandoval <osandov@fb.com>

Here's v2 of the patch making blk-mq's scalable bitmaps a generic
library, now blown up into 5 patches. v1 is here [1].

Changes since v1:

- 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
  was intended originally for blk-mq.

I ran some fio jobs on top of null-blk and verified that there was no
performance impact from patches 1-4. Patch 5 is a slight win, although I
couldn't come up with a benchmark where the tag allocation is enough of
a bottleneck to see huge benefits. My synthetic test module [2], which
does the scale_bitmap operations directly, shows much better results.

This survived a quick run of xfstests and a battery of benchmarks.
Applies to 4.8-rc5.

Thanks!

1: http://marc.info/?l=linux-block&m=147251402805405&w=2
2: https://github.com/osandov/osandov-linux/blob/master/modules/scale_bitmap_benchmark/scale_bitmap_benchmark.c

Omar Sandoval (5):
  blk-mq: abstract tag allocation out into scale_bitmap library
  scale_bitmap: allocate wait queues on a specific node
  scale_bitmap: push per-cpu last_tag into scale_bitmap_queue
  scale_bitmap: push alloc policy into scale_bitmap_queue
  scale_bitmap: randomize initial last_cache values

 MAINTAINERS                  |   1 +
 block/Kconfig                |   1 +
 block/blk-mq-tag.c           | 504 ++++++++++---------------------------------
 block/blk-mq-tag.h           |  42 ++--
 block/blk-mq.c               | 115 +++-------
 block/blk-mq.h               |  11 -
 include/linux/blk-mq.h       |   9 +-
 include/linux/scale_bitmap.h | 390 +++++++++++++++++++++++++++++++++
 lib/Kconfig                  |   3 +
 lib/Makefile                 |   2 +
 lib/scale_bitmap.c           | 325 ++++++++++++++++++++++++++++
 11 files changed, 887 insertions(+), 516 deletions(-)
 create mode 100644 include/linux/scale_bitmap.h
 create mode 100644 lib/scale_bitmap.c

-- 
2.9.3

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

end of thread, other threads:[~2016-09-08 18:16 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-07 23:46 [PATCH v2 0/5] blk-mq: abstract tag allocation out into scale_bitmap library Omar Sandoval
2016-09-07 23:46 ` [PATCH v2 1/5] " Omar Sandoval
2016-09-08  0:01   ` Alexei Starovoitov
2016-09-08  0:38     ` Omar Sandoval
2016-09-08  1:12       ` Alexei Starovoitov
2016-09-08 16:11         ` Jens Axboe
2016-09-08 18:16           ` Omar Sandoval
2016-09-07 23:46 ` [PATCH v2 2/5] scale_bitmap: allocate wait queues on a specific node Omar Sandoval
2016-09-07 23:46 ` [PATCH v2 3/5] scale_bitmap: push per-cpu last_tag into scale_bitmap_queue Omar Sandoval
2016-09-07 23:46 ` [PATCH v2 4/5] scale_bitmap: push alloc policy " Omar Sandoval
2016-09-07 23:46 ` [PATCH v2 5/5] scale_bitmap: randomize initial last_cache values Omar Sandoval

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