projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a4273cd
)
mmc: core: reduce erase event timeout
author
Shawn Lin
<shawn.lin@rock-chips.com>
Tue, 23 Jun 2015 01:20:00 +0000
(09:20 +0800)
committer
Shawn Lin
<shawn.lin@rock-chips.com>
Tue, 23 Jun 2015 01:36:43 +0000
(09:36 +0800)
We set wrong discard timeout limitation for erase event
which exceed that block layer does. And jbd warning
can be observed like blow:
INFO: task update_binary:151 blocked for more than 10 seconds.
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
update_binary D
ffffffc000085674
0 151 134 0x00400008
Call trace:
[<
ffffffc000085674
>] __switch_to+0x80/0x8c
[<
ffffffc00082cb28
>] __schedule+0x4e0/0x6f4
[<
ffffffc00082cda0
>] schedule+0x64/0x70
[<
ffffffc00082aea0
>] schedule_timeout+0x28/0x250
[<
ffffffc00082d2ac
>] io_schedule_timeout+0x6c/0xa8
[<
ffffffc00082d37c
>] wait_for_common_io.constprop.111+0x94/0x114
[<
ffffffc00082d41c
>] wait_for_completion_io+0xc/0x18
[<
ffffffc0002ffb08
>] blkdev_issue_discard+0x1e0/0x214
[<
ffffffc000300630
>] blkdev_ioctl+0x2d0/0x708
[<
ffffffc00030d52c
>] compat_blkdev_ioctl+0x464/0x5ec
[<
ffffffc0001bdf0c
>] compat_sys_ioctl+0x104/0x1e8
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
drivers/mmc/core/core.c
patch
|
blob
|
history
diff --git
a/drivers/mmc/core/core.c
b/drivers/mmc/core/core.c
index 4a337b16264435539decbba5efb40900335cd543..285949f7d062c28a4b4a6784fa1ed63b310d95d0 100755
(executable)
--- a/
drivers/mmc/core/core.c
+++ b/
drivers/mmc/core/core.c
@@
-403,9
+403,13
@@
static void mmc_get_req_timeout(struct mmc_request *mrq, u32 *timeout)
(mrq->cmd->opcode == MMC_ERASE_GROUP_START) ||
(mrq->cmd->opcode == MMC_ERASE_GROUP_END) ||
(mrq->cmd->opcode == MMC_SEND_STATUS))
- *timeout = 2500000;
+ ((mrq->cmd->opcode == MMC_ERASE) &&
+ ((mrq->cmd->arg == MMC_DISCARD_ARG) ||
+ (mrq->cmd->arg == MMC_TRIM_ARG))) ?
+ (*timeout = 10000) : (*timeout = 25000);
else
*timeout = 500;
+
} else {
*timeout = mrq->cmd->data->blocks *
mrq->cmd->data->blksz * 500;