From: Per Forlin <per.forlin@linaro.org>
To: linaro-dev@lists.linaro.org,
Nicolas Pitre <nicolas.pitre@linaro.org>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org,
Nickolay Nickolaev <nicknickolaev@gmail.com>,
Venkatraman S <svenkatr@ti.com>,
Linus Walleij <linus.walleij@linaro.org>
Cc: Chris Ball <cjb@laptop.org>, Per Forlin <per.forlin@linaro.org>
Subject: Re: [PATCH v8 12/12] mmc: block: add handling for two parallel block requests in issue_rw_rq
Date: Tue, 28 Jun 2011 11:39:41 +0200 [thread overview]
Message-ID: <BANLkTikkv+RQKZCX2PeZUDhM1gnVXCKO2w@mail.gmail.com> (raw)
In-Reply-To: <1309248717-14606-13-git-send-email-per.forlin@linaro.org>
On 28 June 2011 10:11, Per Forlin <per.forlin@linaro.org> wrote:
> Change mmc_blk_issue_rw_rq() to become asynchronous.
> The execution flow looks like this:
> The mmc-queue calls issue_rw_rq(), which sends the request
> to the host and returns back to the mmc-queue. The mmc-queue calls
> issue_rw_rq() again with a new request. This new request is prepared,
> in isuue_rw_rq(), then it waits for the active request to complete before
> pushing it to the host. When to mmc-queue is empty it will call
> isuue_rw_rq() with req=NULL to finish off the active request
> without starting a new request.
>
> Signed-off-by: Per Forlin <per.forlin@linaro.org>
> ---
> drivers/mmc/card/block.c | 80 +++++++++++++++++++++++++++++++++++++--------
> drivers/mmc/card/queue.c | 17 +++++++---
> drivers/mmc/card/queue.h | 1 +
> 3 files changed, 78 insertions(+), 20 deletions(-)
>
> diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
> index 7ed2c68..825741e 100644
> --- a/drivers/mmc/card/block.c
> +++ b/drivers/mmc/card/block.c
...
> @@ -1066,6 +1085,13 @@ static int mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *req)
> ret = __blk_end_request(req, 0,
> brq->data.bytes_xfered);
> spin_unlock_irq(&md->lock);
> + if (status == MMC_BLK_SUCCESS && ret) {
> + /* If this happen it is a bug */
> + printk(KERN_ERR "%s BUG rq_tot %d d_xfer %d\n",
> + __func__, blk_rq_bytes(req),
> + brq->data.bytes_xfered);
+ rqc = NULL
If there is a new request (rqc != NULL) it will already be started
when reaching this point.
If rqc is set it will be started again at start_new_req.
I wonder if this paranoia check is necessary. If "status ==
MMC_BLK_SUCCESS" all bytes are transferred and no error returned from
mmc layer.
__blk_end_request would always return 0 in this case, please comment
if you disagree.
...
> + start_new_req:
> + if (rqc) {
> + mmc_blk_rw_rq_prep(mq->mqrq_cur, card, 0, mq);
> + mmc_start_req(card->host, &mq->mqrq_cur->mmc_active, NULL);
> + }
> +
> return 0;
> }
/Per
next prev parent reply other threads:[~2011-06-28 9:40 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-28 8:11 [PATCH v8 00/12] use nonblock mmc requests to minimize latency Per Forlin
2011-06-28 8:11 ` [PATCH v8 01/12] mmc: core: add non-blocking mmc request function Per Forlin
2011-06-28 8:11 ` [PATCH v8 02/12] omap_hsmmc: add support for pre_req and post_req Per Forlin
2011-06-28 8:11 ` [PATCH v8 03/12] mmci: implement pre_req() and post_req() Per Forlin
2011-06-28 8:11 ` [PATCH v8 04/12] mmc: mmc_test: add debugfs file to list all tests Per Forlin
2011-06-28 8:11 ` [PATCH v8 05/12] mmc: mmc_test: add test for non-blocking transfers Per Forlin
2011-07-01 13:29 ` Per Forlin
2011-06-28 8:11 ` [PATCH v8 06/12] mmc: mmc_test: test to measure how sg_len affect performance Per Forlin
2011-07-01 13:33 ` Per Forlin
2011-06-28 8:11 ` [PATCH v8 07/12] mmc: block: add member in mmc queue struct to hold request data Per Forlin
2011-06-28 8:11 ` [PATCH v8 08/12] mmc: block: add a block request prepare function Per Forlin
2011-06-28 8:11 ` [PATCH v8 09/12] mmc: block: move error code in issue_rw_rq to a separate function Per Forlin
2011-06-28 8:11 ` [PATCH v8 10/12] mmc: queue: add a second mmc queue request member Per Forlin
2011-06-28 8:11 ` [PATCH v8 11/12] mmc: core: add random fault injection Per Forlin
2011-06-28 8:11 ` [PATCH v8 12/12] mmc: block: add handling for two parallel block requests in issue_rw_rq Per Forlin
2011-06-28 9:39 ` Per Forlin [this message]
2011-06-28 9:54 ` [PATCH v8 00/12] use nonblock mmc requests to minimize latency Kyungmin Park
2011-06-30 12:36 ` Poddar, Sourav
2011-06-30 13:11 ` S, Venkatraman
2011-06-30 13:12 ` Arnd Bergmann
2011-06-30 13:30 ` Russell King - ARM Linux
2011-07-01 16:44 ` Arnd Bergmann
2011-07-02 12:29 ` Russell King - ARM Linux
2011-07-02 19:37 ` Arnd Bergmann
2011-07-03 20:53 ` Per Forlin
2011-07-04 1:07 ` Nicolas Pitre
2011-07-01 14:39 ` Linus Walleij
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=BANLkTikkv+RQKZCX2PeZUDhM1gnVXCKO2w@mail.gmail.com \
--to=per.forlin@linaro.org \
--cc=cjb@laptop.org \
--cc=linaro-dev@lists.linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=nicknickolaev@gmail.com \
--cc=nicolas.pitre@linaro.org \
--cc=svenkatr@ti.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
all inboxes | Powered by JetHome®