[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-block
Subject: Re: [PATCH 11/16] mmc: block: shuffle retry and error handling
From: Bartlomiej Zolnierkiewicz <b.zolnierkie () samsung ! com>
Date: 2017-02-28 17:45:20
Message-ID: 22219053.LlSbdLjSYi () amdc3058
[Download RAW message or body]
On Thursday, February 09, 2017 04:33:58 PM Linus Walleij wrote:
> Instead of doing retries at the same time as trying to submit new
> requests, do the retries when the request is reported as completed
> by the driver, in the finalization worker.
>
> This is achieved by letting the core worker call back into the block
> layer using mmc_blk_rw_done(), that will read the status and repeatedly
> try to hammer the request using single request etc by calling back to
> the core layer using mmc_restart_areq()
>
> The beauty of it is that the completion will not complete until the
> block layer has had the opportunity to hammer a bit at the card using
> a bunch of different approaches in the while() loop in
> mmc_blk_rw_done()
>
> The algorithm for recapture, retry and handle errors is essentially
> identical to the one we used to have in mmc_blk_issue_rw_rq(),
> only augmented to get called in another path.
>
> We have to add and initialize a pointer back to the struct mmc_queue
> from the struct mmc_queue_req to find the queue from the asynchronous
> request.
>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
It seems that after this change we can end up queuing more
work for kthread from the kthread worker itself and wait
inside it for this nested work to complete. I hope that
you've tested it with simulating errors and it all works.
Under this assumption:
Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Also some very minor nit:
+ case MMC_BLK_DATA_ERR: {
+ int err;
+ err = mmc_blk_reset(md, host, type);
During the code movement CodingStyle suffered.
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic