Linux block layer
 help / color / mirror / Atom feed
From: Omar Sandoval <osandov@osandov.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: "linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	Omar Sandoval <osandov@fb.com>
Subject: Re: [PATCH] blk-mq: fix sbitmap ws_active for shared tags
Date: Mon, 25 Mar 2019 12:04:41 -0700	[thread overview]
Message-ID: <20190325190441.GG5826@vader> (raw)
In-Reply-To: <5ed3aa61-e12d-2dc4-2a8d-e9cc02788371@kernel.dk>

On Mon, Mar 25, 2019 at 12:58:47PM -0600, Jens Axboe wrote:
> On 3/25/19 12:56 PM, Omar Sandoval wrote:
> > On Mon, Mar 25, 2019 at 10:22:50AM -0600, Jens Axboe wrote:
> >> We now wrap sbitmap waitqueues in an active counter, so we can avoid
> >> iterating wakeups unless we have waiters there. This works as long as
> >> everyone that's manipulating the waitqueues use the proper helpers. For
> >> the tag wait case for shared tags, however, we add ourselves to the
> >> waitqueue without incrementing/decrementing the ->ws_active count. This
> >> means that wakeups can take a long time to happen.
> >>
> >> Fix this by manually doing the inc/dec as needed for the wait queue
> >> handling.
> >>
> >> Fixes: 5d2ee7122c73 ("sbitmap: optimize wakeup check")
> >> Signed-off-by: Jens Axboe <axboe@kernel.dk>
> > 
> > Can this use the helpers we added in 9f6b7ef6c3eb ("sbitmap: add helpers
> > for add/del wait queue handling")?
> 
> I don't think so without adding more, which seems kind of silly for this
> very specialized use case of openly manipulating the wait queues. The
> blk-mq setup there is very special cased.

Yup, I see. Assuming it fixes the issue,

Reviewed-by: Omar Sandoval <osandov@fb.com>

  reply	other threads:[~2019-03-25 19:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-25 16:22 [PATCH] blk-mq: fix sbitmap ws_active for shared tags Jens Axboe
2019-03-25 16:39 ` Bart Van Assche
2019-03-25 16:42   ` Jens Axboe
2019-03-25 18:56 ` Omar Sandoval
2019-03-25 18:58   ` Jens Axboe
2019-03-25 19:04     ` Omar Sandoval [this message]
2019-03-25 19:05       ` 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=20190325190441.GG5826@vader \
    --to=osandov@osandov.com \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=osandov@fb.com \
    /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