From: Christoph Hellwig <hch@lst.de>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: "linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
linux-block@vger.kernel.org, Jens Axboe <axboe@kernel.dk>,
Christoph Hellwig <hch@lst.de>,
Ulf Hansson <ulf.hansson@linaro.org>,
Adrian Hunter <adrian.hunter@intel.com>,
Paolo Valente <paolo.valente@linaro.org>
Subject: Re: Outstanding MQ questions from MMC
Date: Thu, 18 May 2017 11:40:42 +0200 [thread overview]
Message-ID: <20170518094042.GA10016@lst.de> (raw)
In-Reply-To: <CACRpkdbZrkAqEdP1-QqDww0ZuFcY47Jgj9dPqkG_whrx7pwC-w@mail.gmail.com>
On Wed, Mar 29, 2017 at 05:09:37AM +0200, Linus Walleij wrote:
> 2. When MMC cards are ejected a serious error condition occurs. So for this
> reason we spool out the queue with
>
> req->rq_flags |= RQF_QUIET;
> blk_end_request_all(req, -EIO);
>
> This will shut up a huge amount of console errors for example.
> I have no clue on how to manage this with MQ. I am currently using
>
> blk_mq_complete_request(mq_rq->req, -EIO);
>
> and nothing else, and it will hit all requests for the ejected card coming
> in from this point. Is this the right solution? Or is there some medium
> eject handling I'm not aware of inside the MQ layer? It seems like something
> that can happen on pluggable harddrives and CDROMS and what not.
Hot unplug handling currently is a mess in the block layer (not just the
mq case). Especially if you ever requeue an I/O there is tons of
boilerplate code. I wish we could move a little more of this into the
core, but right now I don't have a good idea on how to.
> 3. Sometimes a read or write gets partially completed. Say we read 12 out
> of 15 sectors or somthing like that. I have no idea how often this occurs in
> practice. With the old block layer we did this:
>
> blk_end_request(req, 0, bytes_xfered);
You can still do this with mq, but you have to open code it. Take a look
at scsi_end_request which has opencoded versions of the mq and non-mq
end_request routines. Currently it's the only example of blk-mq partial
completions.
prev parent reply other threads:[~2017-05-18 9:40 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-29 3:09 Outstanding MQ questions from MMC Linus Walleij
2017-03-30 12:42 ` Arnd Bergmann
2017-03-30 16:39 ` Ulf Hansson
2017-03-31 8:43 ` Arnd Bergmann
2017-04-13 13:22 ` Linus Walleij
2017-04-14 18:41 ` Avri Altman
2017-04-14 18:41 ` Avri Altman
2017-04-15 18:34 ` Linus Walleij
2017-04-15 19:24 ` Avri Altman
2017-04-15 19:24 ` Avri Altman
2017-04-18 15:31 ` Alex Lemberg
2017-04-18 15:31 ` Alex Lemberg
2017-05-18 9:36 ` Linus Walleij
2017-04-15 10:20 ` Ulf Hansson
2017-05-18 9:40 ` Christoph Hellwig [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=20170518094042.GA10016@lst.de \
--to=hch@lst.de \
--cc=adrian.hunter@intel.com \
--cc=axboe@kernel.dk \
--cc=linus.walleij@linaro.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=paolo.valente@linaro.org \
--cc=ulf.hansson@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.