mbox series

[0/3] mmc: core: Avoid hogging the CPU while polling for busy

Message ID 20210702134229.357717-1-ulf.hansson@linaro.org
Headers show
Series mmc: core: Avoid hogging the CPU while polling for busy | expand

Message

Ulf Hansson July 2, 2021, 1:42 p.m. UTC
Step by step, code that have been dealing sending CMD13 to poll the card for
busy, have been moved to use the common mmc_poll_for_busy() loop. This helps to
avoid hogging the CPU, for example, as it inserts a small delay in between each
polling attempt. Additionally, it avoids open coding.

This series takes the next and final step, by moving the mmc block device layer
from its own busy polling loop, into using the common code.

Please test and review!

Kind regards
Uffe

Ulf Hansson (3):
  mmc: core: Avoid hogging the CPU while polling for busy in the I/O err
    path
  mmc: core: Avoid hogging the CPU while polling for busy for mmc ioctls
  mmc: core: Avoid hogging the CPU while polling for busy after I/O
    writes

 drivers/mmc/core/block.c   | 74 +++++++++++++++++---------------------
 drivers/mmc/core/mmc_ops.c |  5 ++-
 drivers/mmc/core/mmc_ops.h |  1 +
 3 files changed, 37 insertions(+), 43 deletions(-)

-- 
2.25.1

Comments

Shawn Lin July 6, 2021, 7:05 a.m. UTC | #1
On 2021/7/2 21:42, Ulf Hansson wrote:
> Step by step, code that have been dealing sending CMD13 to poll the card for

> busy, have been moved to use the common mmc_poll_for_busy() loop. This helps to

> avoid hogging the CPU, for example, as it inserts a small delay in between each

> polling attempt. Additionally, it avoids open coding.

> 

> This series takes the next and final step, by moving the mmc block device layer

> from its own busy polling loop, into using the common code.

> 

> Please test and review!


Hi Ulf,

This patch-set looks good,

Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>


> 

> Kind regards

> Uffe

> 

> Ulf Hansson (3):

>    mmc: core: Avoid hogging the CPU while polling for busy in the I/O err

>      path

>    mmc: core: Avoid hogging the CPU while polling for busy for mmc ioctls

>    mmc: core: Avoid hogging the CPU while polling for busy after I/O

>      writes

> 

>   drivers/mmc/core/block.c   | 74 +++++++++++++++++---------------------

>   drivers/mmc/core/mmc_ops.c |  5 ++-

>   drivers/mmc/core/mmc_ops.h |  1 +

>   3 files changed, 37 insertions(+), 43 deletions(-)

>
Ulf Hansson Aug. 4, 2021, 11:34 a.m. UTC | #2
On Fri, 2 Jul 2021 at 15:42, Ulf Hansson <ulf.hansson@linaro.org> wrote:
>

> Step by step, code that have been dealing sending CMD13 to poll the card for

> busy, have been moved to use the common mmc_poll_for_busy() loop. This helps to

> avoid hogging the CPU, for example, as it inserts a small delay in between each

> polling attempt. Additionally, it avoids open coding.

>

> This series takes the next and final step, by moving the mmc block device layer

> from its own busy polling loop, into using the common code.

>

> Please test and review!

>

> Kind regards

> Uffe

>

> Ulf Hansson (3):

>   mmc: core: Avoid hogging the CPU while polling for busy in the I/O err

>     path

>   mmc: core: Avoid hogging the CPU while polling for busy for mmc ioctls

>   mmc: core: Avoid hogging the CPU while polling for busy after I/O

>     writes

>

>  drivers/mmc/core/block.c   | 74 +++++++++++++++++---------------------

>  drivers/mmc/core/mmc_ops.c |  5 ++-

>  drivers/mmc/core/mmc_ops.h |  1 +

>  3 files changed, 37 insertions(+), 43 deletions(-)

>


This series has been applied for next. If you encounter any
regressions (performance related as well), please report them!

Kind regards
Uffe