linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* blk-mq queue selection and queue_rq preemption
@ 2014-04-07 12:44 Sagi Grimberg
  2014-04-07 19:45 ` Jens Axboe
  0 siblings, 1 reply; 6+ messages in thread
From: Sagi Grimberg @ 2014-04-07 12:44 UTC (permalink / raw)
  To: Jens Axboe, Christoph Hellwig; +Cc: linux-scsi, Or Gerlitz, Oren Duer

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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-04-09 13:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-07 12:44 blk-mq queue selection and queue_rq preemption Sagi Grimberg
2014-04-07 19:45 ` 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

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).