linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Omar Sandoval <osandov@osandov.com>
To: Jens Axboe <axboe@fb.com>, linux-block@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, kernel-team@fb.com
Subject: [PATCH v2 0/5] blk-mq: abstract tag allocation out into scale_bitmap library
Date: Wed,  7 Sep 2016 16:46:01 -0700	[thread overview]
Message-ID: <cover.1473291702.git.osandov@fb.com> (raw)

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

             reply	other threads:[~2016-09-07 23:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-07 23:46 Omar Sandoval [this message]
2016-09-07 23:46 ` [PATCH v2 1/5] blk-mq: abstract tag allocation out into scale_bitmap library 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1473291702.git.osandov@fb.com \
    --to=osandov@osandov.com \
    --cc=axboe@fb.com \
    --cc=kernel-team@fb.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).