* Re: linux-next: Tree for Oct 25
[not found] <20211025204921.73cb3011@canb.auug.org.au>
@ 2021-10-25 22:11 ` Dmitry Osipenko
2021-10-26 1:28 ` Ming Lei
0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Osipenko @ 2021-10-25 22:11 UTC (permalink / raw)
To: Stephen Rothwell, Linux Next Mailing List, Ulf Hansson,
Adrian Hunter, Jens Axboe
Cc: Linux Kernel Mailing List, linux-mmc, linux-block
Hello,
Recent -next has this new warning splat coming from MMC, please take a look.
------------[ cut here ]------------
WARNING: CPU: 0 PID: 525 at kernel/sched/core.c:9477 __might_sleep+0x65/0x68
do not call blocking ops when !TASK_RUNNING; state=2 set at [<4316eb02>] prepare_to_wait+0x2e/0xb8
Modules linked in:
CPU: 0 PID: 525 Comm: Xorg Tainted: G W 5.15.0-rc6-next-20211025-00226-g89ccd6948ec3 #5
Hardware name: NVIDIA Tegra SoC (Flattened Device Tree)
(unwind_backtrace) from [<c01089f9>] (show_stack+0x11/0x14)
(show_stack) from [<c0afacb9>] (dump_stack_lvl+0x2b/0x34)
(dump_stack_lvl) from [<c011f689>] (__warn+0xa1/0xe8)
(__warn) from [<c0af6729>] (warn_slowpath_fmt+0x65/0x7c)
(warn_slowpath_fmt) from [<c01421b9>] (__might_sleep+0x65/0x68)
(__might_sleep) from [<c07eb377>] (mmc_blk_rw_wait+0x2f/0x118)
(mmc_blk_rw_wait) from [<c07eba11>] (mmc_blk_mq_issue_rq+0x219/0x71c)
(mmc_blk_mq_issue_rq) from [<c07ec199>] (mmc_mq_queue_rq+0xf9/0x200)
(mmc_mq_queue_rq) from [<c04ad247>] (__blk_mq_try_issue_directly+0xcb/0x100)
(__blk_mq_try_issue_directly) from [<c04adb89>] (blk_mq_request_issue_directly+0x2d/0x48)
(blk_mq_request_issue_directly) from [<c04adcf3>] (blk_mq_flush_plug_list+0x14f/0x1f4)
(blk_mq_flush_plug_list) from [<c04a5313>] (blk_flush_plug+0x83/0xb8)
(blk_flush_plug) from [<c0b013cb>] (io_schedule+0x2b/0x3c)
(io_schedule) from [<c0b01a17>] (bit_wait_io+0xf/0x48)
(bit_wait_io) from [<c0b01783>] (__wait_on_bit+0x3f/0x88)
(__wait_on_bit) from [<c0b01823>] (out_of_line_wait_on_bit+0x57/0x68)
(out_of_line_wait_on_bit) from [<c03539c1>] (ext4_read_bh+0xb1/0xb4)
(ext4_read_bh) from [<c03146b3>] (__read_extent_tree_block+0xa7/0x134)
(__read_extent_tree_block) from [<c031526f>] (ext4_find_extent+0x13b/0x2fc)
(ext4_find_extent) from [<c0317da5>] (ext4_ext_map_blocks+0x4d/0x1160)
(ext4_ext_map_blocks) from [<c03286c3>] (ext4_map_blocks+0x1bf/0x428)
(ext4_map_blocks) from [<c03436b1>] (ext4_mpage_readpages+0x399/0x660)
(ext4_mpage_readpages) from [<c02322d9>] (read_pages+0x51/0x18c)
(read_pages) from [<c02324f5>] (page_cache_ra_unbounded+0xe1/0x174)
(page_cache_ra_unbounded) from [<c02299c1>] (filemap_get_pages+0xc5/0x524)
(filemap_get_pages) from [<c0229eff>] (filemap_read+0xdf/0x2fc)
(filemap_read) from [<c028bae9>] (vfs_read+0x151/0x23c)
(vfs_read) from [<c028bf4b>] (ksys_read+0x47/0x98)
(ksys_read) from [<c01000a1>] (ret_fast_syscall+0x1/0x16)
Exception stack(0xc593ffa8 to 0xc593fff0)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: linux-next: Tree for Oct 25
2021-10-25 22:11 ` linux-next: Tree for Oct 25 Dmitry Osipenko
@ 2021-10-26 1:28 ` Ming Lei
2021-10-26 8:40 ` Dmitry Osipenko
0 siblings, 1 reply; 3+ messages in thread
From: Ming Lei @ 2021-10-26 1:28 UTC (permalink / raw)
To: Dmitry Osipenko
Cc: Stephen Rothwell, Linux Next Mailing List, Ulf Hansson,
Adrian Hunter, Jens Axboe, Linux Kernel Mailing List, linux-mmc,
linux-block
On Tue, Oct 26, 2021 at 01:11:07AM +0300, Dmitry Osipenko wrote:
> Hello,
>
> Recent -next has this new warning splat coming from MMC, please take a look.
>
> ------------[ cut here ]------------
> WARNING: CPU: 0 PID: 525 at kernel/sched/core.c:9477 __might_sleep+0x65/0x68
> do not call blocking ops when !TASK_RUNNING; state=2 set at [<4316eb02>] prepare_to_wait+0x2e/0xb8
> Modules linked in:
> CPU: 0 PID: 525 Comm: Xorg Tainted: G W 5.15.0-rc6-next-20211025-00226-g89ccd6948ec3 #5
> Hardware name: NVIDIA Tegra SoC (Flattened Device Tree)
> (unwind_backtrace) from [<c01089f9>] (show_stack+0x11/0x14)
> (show_stack) from [<c0afacb9>] (dump_stack_lvl+0x2b/0x34)
> (dump_stack_lvl) from [<c011f689>] (__warn+0xa1/0xe8)
> (__warn) from [<c0af6729>] (warn_slowpath_fmt+0x65/0x7c)
> (warn_slowpath_fmt) from [<c01421b9>] (__might_sleep+0x65/0x68)
> (__might_sleep) from [<c07eb377>] (mmc_blk_rw_wait+0x2f/0x118)
> (mmc_blk_rw_wait) from [<c07eba11>] (mmc_blk_mq_issue_rq+0x219/0x71c)
> (mmc_blk_mq_issue_rq) from [<c07ec199>] (mmc_mq_queue_rq+0xf9/0x200)
> (mmc_mq_queue_rq) from [<c04ad247>] (__blk_mq_try_issue_directly+0xcb/0x100)
> (__blk_mq_try_issue_directly) from [<c04adb89>] (blk_mq_request_issue_directly+0x2d/0x48)
> (blk_mq_request_issue_directly) from [<c04adcf3>] (blk_mq_flush_plug_list+0x14f/0x1f4)
> (blk_mq_flush_plug_list) from [<c04a5313>] (blk_flush_plug+0x83/0xb8)
> (blk_flush_plug) from [<c0b013cb>] (io_schedule+0x2b/0x3c)
> (io_schedule) from [<c0b01a17>] (bit_wait_io+0xf/0x48)
The following patch should fix the issue:
diff --git a/block/blk-mq.c b/block/blk-mq.c
index a71aeed7b987..bee9cb2a44cb 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -2223,7 +2223,7 @@ void blk_mq_flush_plug_list(struct blk_plug *plug, bool from_schedule)
return;
plug->rq_count = 0;
- if (!plug->multiple_queues && !plug->has_elevator) {
+ if (!plug->multiple_queues && !plug->has_elevator && !from_schedule) {
blk_mq_plug_issue_direct(plug, from_schedule);
if (rq_list_empty(plug->mq_list))
return;
--
Ming
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: linux-next: Tree for Oct 25
2021-10-26 1:28 ` Ming Lei
@ 2021-10-26 8:40 ` Dmitry Osipenko
0 siblings, 0 replies; 3+ messages in thread
From: Dmitry Osipenko @ 2021-10-26 8:40 UTC (permalink / raw)
To: Ming Lei
Cc: Stephen Rothwell, Linux Next Mailing List, Ulf Hansson,
Adrian Hunter, Jens Axboe, Linux Kernel Mailing List, linux-mmc,
linux-block
26.10.2021 04:28, Ming Lei пишет:
> On Tue, Oct 26, 2021 at 01:11:07AM +0300, Dmitry Osipenko wrote:
>> Hello,
>>
>> Recent -next has this new warning splat coming from MMC, please take a look.
>>
>> ------------[ cut here ]------------
>> WARNING: CPU: 0 PID: 525 at kernel/sched/core.c:9477 __might_sleep+0x65/0x68
>> do not call blocking ops when !TASK_RUNNING; state=2 set at [<4316eb02>] prepare_to_wait+0x2e/0xb8
>> Modules linked in:
>> CPU: 0 PID: 525 Comm: Xorg Tainted: G W 5.15.0-rc6-next-20211025-00226-g89ccd6948ec3 #5
>> Hardware name: NVIDIA Tegra SoC (Flattened Device Tree)
>> (unwind_backtrace) from [<c01089f9>] (show_stack+0x11/0x14)
>> (show_stack) from [<c0afacb9>] (dump_stack_lvl+0x2b/0x34)
>> (dump_stack_lvl) from [<c011f689>] (__warn+0xa1/0xe8)
>> (__warn) from [<c0af6729>] (warn_slowpath_fmt+0x65/0x7c)
>> (warn_slowpath_fmt) from [<c01421b9>] (__might_sleep+0x65/0x68)
>> (__might_sleep) from [<c07eb377>] (mmc_blk_rw_wait+0x2f/0x118)
>> (mmc_blk_rw_wait) from [<c07eba11>] (mmc_blk_mq_issue_rq+0x219/0x71c)
>> (mmc_blk_mq_issue_rq) from [<c07ec199>] (mmc_mq_queue_rq+0xf9/0x200)
>> (mmc_mq_queue_rq) from [<c04ad247>] (__blk_mq_try_issue_directly+0xcb/0x100)
>> (__blk_mq_try_issue_directly) from [<c04adb89>] (blk_mq_request_issue_directly+0x2d/0x48)
>> (blk_mq_request_issue_directly) from [<c04adcf3>] (blk_mq_flush_plug_list+0x14f/0x1f4)
>> (blk_mq_flush_plug_list) from [<c04a5313>] (blk_flush_plug+0x83/0xb8)
>> (blk_flush_plug) from [<c0b013cb>] (io_schedule+0x2b/0x3c)
>> (io_schedule) from [<c0b01a17>] (bit_wait_io+0xf/0x48)
>
> The following patch should fix the issue:
>
> diff --git a/block/blk-mq.c b/block/blk-mq.c
> index a71aeed7b987..bee9cb2a44cb 100644
> --- a/block/blk-mq.c
> +++ b/block/blk-mq.c
> @@ -2223,7 +2223,7 @@ void blk_mq_flush_plug_list(struct blk_plug *plug, bool from_schedule)
> return;
> plug->rq_count = 0;
>
> - if (!plug->multiple_queues && !plug->has_elevator) {
> + if (!plug->multiple_queues && !plug->has_elevator && !from_schedule) {
> blk_mq_plug_issue_direct(plug, from_schedule);
> if (rq_list_empty(plug->mq_list))
> return;
>
Thank you!
Tested-by: Dmitry Osipenko <digetx@gmail.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-10-26 8:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20211025204921.73cb3011@canb.auug.org.au>
2021-10-25 22:11 ` linux-next: Tree for Oct 25 Dmitry Osipenko
2021-10-26 1:28 ` Ming Lei
2021-10-26 8:40 ` Dmitry Osipenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).