All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: linux-block@vger.kernel.org
Subject: [PATCHSET 0/2] Add queue_is_busy helper
Date: Thu,  8 Nov 2018 08:42:14 -0700	[thread overview]
Message-ID: <20181108154216.23853-1-axboe@kernel.dk> (raw)

DM currently uses atomic inc/dec to maintain a busy count of
IO on a given device. For the dm-mq path, we can replace this
with helper that just checks the state of the tags on the device.

First patch is a prep patch that allows the iteration helpers
to return true/false, like we support internally in sbitmap.
For a busy check we don't care about how many requests are
busy, just if some are or not. Hence we can stop iterating
tags as soon as we find one that is allocated.


 block/blk-mq-debugfs.c |  4 +++-
 block/blk-mq-tag.c     |  4 ++--
 block/blk-mq.c         | 38 +++++++++++++++++++++++++++++++++-----
 include/linux/blk-mq.h |  6 ++++--
 4 files changed, 42 insertions(+), 10 deletions(-)

-- 
Jens Axboe

             reply	other threads:[~2018-11-08 15:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-08 15:42 Jens Axboe [this message]
2018-11-08 15:42 ` [PATCH 1/2] blk-mq-tag: change busy_iter_fn to return whether to continue or not Jens Axboe
2018-11-08 15:48   ` Mike Snitzer
2018-11-08 15:42 ` [PATCH 2/2] blk-mq: provide a helper to check if a queue is busy Jens Axboe
2018-11-08 15:49   ` Mike Snitzer
2018-11-08 15:54   ` Laurence Oberman
2018-11-08 15:58     ` Jens Axboe

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=20181108154216.23853-1-axboe@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=linux-block@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.