All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sagi Grimberg <sagig@dev.mellanox.co.il>
To: Jens Axboe <axboe@kernel.dk>, Christoph Hellwig <hch@lst.de>
Cc: linux-scsi <linux-scsi@vger.kernel.org>,
	Or Gerlitz <ogerlitz@mellanox.com>, Oren Duer <oren@mellanox.com>
Subject: blk-mq queue selection and queue_rq preemption
Date: Mon, 07 Apr 2014 15:44:18 +0300	[thread overview]
Message-ID: <53429DA2.4030708@dev.mellanox.co.il> (raw)

Hey Jens, Christoph & Co,

I raised this question at LSF but didn't get a clear answer on this matter.
So it seems to me that the hctx selection and the actual request 
dispatch (queue_rq) are preemptive:
(1) blk_mq_get_ctx(q);
(2) map_queue(q, ctx->cpu);
...
(3) blk_mq_put_ctx(ctx);
(4) blk_mq_run_hw_queue(hctx, async);

It is possible that an MQ device driver may want to implement a lockless 
scheme counting on (running) CPU <-> hctx attachment.
Generally speaking, I think that LLDs will be more comfortable knowing 
that they are not preemptive in the dispatch flow.

My question is, is this a must? if so can you please explain why?

Is it possible to put the hctx (restoring preemption) after run_hw_queue 
allowing to LLDs to be sure that the selected queue
match the running CPU?

Thanks,

Sagi.

             reply	other threads:[~2014-04-07 12:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-07 12:44 Sagi Grimberg [this message]
2014-04-07 19:45 ` blk-mq queue selection and queue_rq preemption Jens Axboe
2014-04-08 11:10   ` Sagi Grimberg
2014-04-08 15:40     ` Jens Axboe
2014-04-09 12:10       ` Sagi Grimberg
2014-04-09 13:37         ` 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=53429DA2.4030708@dev.mellanox.co.il \
    --to=sagig@dev.mellanox.co.il \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=linux-scsi@vger.kernel.org \
    --cc=ogerlitz@mellanox.com \
    --cc=oren@mellanox.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 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.