All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Thumshirn <jthumshirn@suse.de>
To: Jens Axboe <axboe@fb.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	axboe@kernel.dk, linux-block@vger.kernel.org,
	paolo.valente@linaro.org
Subject: Re: [PATCH 1/7] block: use legacy path for flush requests for MQ with a scheduler
Date: Mon, 5 Dec 2016 16:49:05 +0100	[thread overview]
Message-ID: <20161205154905.GK8481@linux-x5ow.site> (raw)
In-Reply-To: <4008ea37-3c08-a7ba-770d-00bbf69617e5@fb.com>

On Mon, Dec 05, 2016 at 08:07:10AM -0700, Jens Axboe wrote:
> On 12/05/2016 06:05 AM, Christoph Hellwig wrote:
> > On Fri, Dec 02, 2016 at 08:15:15PM -0700, Jens Axboe wrote:
> >> No functional changes with this patch, it's just in preparation for
> >> supporting legacy schedulers on blk-mq.
> > 
> > Ewww.  I think without refactoring to clear what 'use_mq_path'
> > means here and better naming this is a total non-started.  Even with
> > that we'll now have yet another code path to worry about.  Is there
> > any chance to instead consolidate into a single path?
> 
> It's not pretty at all. I should have prefaced this patchset with saying
> that it's an experiment in seeing what it would take to simply use the
> old IO schedulers, as a temporary measure, on blk/scsi-mq. I did clean
> it up a bit after posting:
> 
> http://git.kernel.dk/cgit/linux-block/log/?h=blk-mq-legacy-sched
> 
> but I'm not going to claim this is anywhere near merge read, nor clean.
> 
> >>  struct request *blk_get_request(struct request_queue *q, int rw, gfp_t gfp_mask)
> >>  {
> >> -	if (q->mq_ops)
> >> +	if (blk_use_mq_path(q))
> >>  		return blk_mq_alloc_request(q, rw,
> >>  			(gfp_mask & __GFP_DIRECT_RECLAIM) ?
> >>  				0 : BLK_MQ_REQ_NOWAIT);
> > 
> > So now with blk-mq and an elevator set we go into blk_old_get_request,
> > hich will simply allocate new requests.  How does this not break
> > every existing driver?
> 
> Since Johannes found that confusion, maybe I should explain how it all
> works.

To clarify the naming, how about sth. like blk_mq_use_sched() (to align
with blk_mq_sched_dispatch())?


-- 
Johannes Thumshirn                                          Storage
jthumshirn@suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N�rnberg
GF: Felix Imend�rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N�rnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

  reply	other threads:[~2016-12-05 15:49 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-03  3:15 [PATCHSET/RFC] Make legacy IO schedulers work with blk-mq Jens Axboe
2016-12-03  3:15 ` [PATCH 1/7] block: use legacy path for flush requests for MQ with a scheduler Jens Axboe
2016-12-05 13:05   ` Christoph Hellwig
2016-12-05 15:07     ` Jens Axboe
2016-12-05 15:49       ` Johannes Thumshirn [this message]
2016-12-05 15:49         ` Jens Axboe
2016-12-05 22:40       ` Mike Snitzer
2016-12-05 22:50         ` Jens Axboe
2016-12-06 19:50           ` Mike Snitzer
2016-12-05 17:00   ` Ming Lei
2016-12-05 17:09     ` Jens Axboe
2016-12-05 19:22       ` Ming Lei
2016-12-05 19:35         ` Jens Axboe
2016-12-03  3:15 ` [PATCH 2/7] cfq-iosched: use appropriate run queue function Jens Axboe
2016-12-05  8:48   ` Johannes Thumshirn
2016-12-05 15:12     ` Jens Axboe
2016-12-05 15:18       ` Johannes Thumshirn
2016-12-05 13:06   ` Christoph Hellwig
2016-12-05 15:08     ` Jens Axboe
2016-12-03  3:15 ` [PATCH 3/7] block: use appropriate queue running functions Jens Axboe
2016-12-05  9:01   ` Johannes Thumshirn
2016-12-05 13:07   ` Christoph Hellwig
2016-12-05 15:10     ` Jens Axboe
2016-12-05 17:39       ` Jens Axboe
2016-12-03  3:15 ` [PATCH 4/7] blk-mq: blk_account_io_start() takes a bool Jens Axboe
2016-12-05  9:01   ` Johannes Thumshirn
2016-12-05 13:08   ` Christoph Hellwig
2016-12-03  3:15 ` [PATCH 5/7] blk-mq: test patch to get legacy IO schedulers working Jens Axboe
2016-12-03  3:15 ` [PATCH 6/7] block: drop irq+lock when flushing queue plugs Jens Axboe
2016-12-03  3:15 ` [PATCH 7/7] null_blk: add parameters to ask for mq-sched and write cache Jens Axboe
2016-12-03  4:02 ` [PATCHSET/RFC] Make legacy IO schedulers work with blk-mq Jens Axboe
2016-12-03  4:04   ` Jens Axboe
  -- strict thread matches above, loose matches on Subject: below --
2016-12-05 18:26 [PATCHSET/RFC v2] " Jens Axboe
2016-12-05 18:27 ` [PATCH 1/7] block: use legacy path for flush requests for MQ with a scheduler 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=20161205154905.GK8481@linux-x5ow.site \
    --to=jthumshirn@suse.de \
    --cc=axboe@fb.com \
    --cc=axboe@kernel.dk \
    --cc=hch@infradead.org \
    --cc=linux-block@vger.kernel.org \
    --cc=paolo.valente@linaro.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.