linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Ming Lei <ming.lei@redhat.com>, Christoph Hellwig <hch@lst.de>
Cc: linux-block@vger.kernel.org, Jeff Moyer <jmoyer@redhat.com>
Subject: Re: [PATCH] blk-mq: enable IO poll if .nr_queues of type poll > 0
Date: Tue, 18 Dec 2018 06:27:11 -0700	[thread overview]
Message-ID: <acf138ad-6c4f-e9fa-6ac8-72e065432fc6@kernel.dk> (raw)
In-Reply-To: <20181218080918.GA28587@ming.t460p>

On 12/18/18 1:09 AM, Ming Lei wrote:
> On Tue, Dec 18, 2018 at 07:47:39AM +0100, Christoph Hellwig wrote:
>> On Mon, Dec 17, 2018 at 09:34:55PM -0700, Jens Axboe wrote:
>>> On 12/17/18 9:15 PM, Ming Lei wrote:
>>>> The queue mapping of type poll only exists when set->map[HCTX_TYPE_POLL].nr_queues
>>>> is bigger than zero, so enhance the constraint by checking .nr_queues of type poll
>>>> before enabling IO poll.
>>>>
>>>> Otherwise IO race & timeout can be observed when running block/007.
>>>
>>> Looks good to me, but we might consider having a helper for this, since
>>> we have this check in 3 places now. But for now this is good, thanks
>>> Ming.
>>
>> Jens, if you want this I can drop the nvme patch to set nr_maps to 2
>> as it wouldn't be needed.  Not sure which one is more elegant, but
>> I guess Mings version is a little more fool proof.
> 
> For READ queue type, its .nr_maps can be 3 and .nr_queues is zero, so
> if check on the two queue type is kept as consistent, we may get good
> code readability, IMO.
> 
> As Jens mentioned, we may introduce blk_mq_queue_type_supported() helper
> to cover both.

I think that would be preferable.

-- 
Jens Axboe


      reply	other threads:[~2018-12-18 13:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-18  4:15 [PATCH] blk-mq: enable IO poll if .nr_queues of type poll > 0 Ming Lei
2018-12-18  4:34 ` Jens Axboe
2018-12-18  6:47   ` Christoph Hellwig
2018-12-18  8:09     ` Ming Lei
2018-12-18 13:27       ` Jens Axboe [this message]

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=acf138ad-6c4f-e9fa-6ac8-72e065432fc6@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=jmoyer@redhat.com \
    --cc=linux-block@vger.kernel.org \
    --cc=ming.lei@redhat.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;
as well as URLs for NNTP newsgroup(s).