From: Hugh Dickins <hughd@google.com>
To: Tejun Heo <tj@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>,
Andrew Morton <akpm@linux-foundation.org>,
Stephen Rothwell <sfr@canb.auug.org.au>,
linux-next@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
linux-scsi@vger.kernel.org, linux-ide@vger.kernel.org,
x86@kernel.org
Subject: Re: [PATCH block/for-3.3/core] block: an exiting task should be allowed to create io_context
Date: Wed, 28 Dec 2011 00:33:01 -0800 (PST) [thread overview]
Message-ID: <alpine.LSU.2.00.1112280010550.1398@eggly.anvils> (raw)
In-Reply-To: <20111225010238.GA6013@htj.dyndns.org>
On Sat, 24 Dec 2011, Tejun Heo wrote:
> While fixing io_context creation / task exit race condition,
> 6e736be7f2 "block: make ioc get/put interface more conventional and
> fix race on alloction" also prevented an exiting (%PF_EXITING) task
> from creating its own io_context. This is incorrect as exit path may
> issue IOs, e.g. from exit_files(), and if those IOs are the first ones
> issued by the task, io_context needs to be created to process the IOs.
>
> Combined with the existing problem of io_context / io_cq creation
> failure having the possibility of stalling IO, this problem results in
> deterministic full IO lockup with certain workloads.
>
> Fix it by allowing io_context creation regardless of %PF_EXITING for
> %current.
>
> Signed-off-by: Tejun Heo <tj@kernel.org>
> Reported-by: Andrew Morton <akpm@linux-foundation.org>
> Reported-by: Hugh Dickins <hughd@google.com>
Thanks, I think I've now built enough kernels on -next plus your patch
to say that it does indeed solve that problem.
However, there are a couple of other unhealthy symptoms I've noticed
under load in -next's block/cfq layer, both with and without your patch.
One is kernel BUG at block/cfq-iosched.c:2585!
BUG_ON(RB_EMPTY_ROOT(&cfqq->sort_list));
cfq_dispatch_request+0x1a
cfq_dispatch_requests+0x5c
blk_peek_request+0x195
scsi_request_fn+0x6a
__blk_run_queue+0x16
scsi_run_queue+0x18a
scsi_next_command+0x36
scsi_io_completion+0x426
scsi_finish_command+0xaf
scsi_softirq_done+0xdd
blk_done_softirq+0x6c
__do_softirq+0x80
call_softirq+0x1c
do_softirq+0x33
irq_exit+0x3f
do_IRQ+0x97
ret_from_intr
I've had that one four times now on different machines; but quicker
to reproduce are these warnings from CONFIG_DEBUG_LIST=y:
------------[ cut here ]------------
WARNING: at lib/list_debug.c:53 __list_del_entry+0x8d/0x98()
Hardware name: 4174AY9
list_del corruption. prev->next should be ffff880005aa1380, but was 6b6b6b6b6b6b6b6b
Modules linked in: snd_pcm_oss snd_mixer_oss snd_seq snd_seq_device
Pid: 29241, comm: cc1 Tainted: G W 3.2.0-rc6-next-20111222 #18
Call Trace:
<IRQ> [<ffffffff810544b4>] warn_slowpath_common+0x80/0x98
[<ffffffff81054560>] warn_slowpath_fmt+0x41/0x43
[<ffffffff811fc1a1>] __list_del_entry+0x8d/0x98
[<ffffffff811df8ab>] cfq_remove_request+0x3b/0xdf
[<ffffffff811df989>] cfq_dispatch_insert+0x3a/0x87
[<ffffffff811dfb3b>] cfq_dispatch_request+0x65/0x92
[<ffffffff811dfbc4>] cfq_dispatch_requests+0x5c/0x133
[<ffffffff812e103e>] ? scsi_request_fn+0x3b6/0x3d3
[<ffffffff811d3069>] blk_peek_request+0x195/0x1a6
[<ffffffff812e103e>] ? scsi_request_fn+0x3b6/0x3d3
[<ffffffff812e0cf5>] scsi_request_fn+0x6d/0x3d3
[<ffffffff811d0730>] __blk_run_queue+0x19/0x1b
[<ffffffff811d0bfd>] blk_run_queue+0x21/0x35
[<ffffffff812e08c4>] scsi_run_queue+0x11f/0x1b9
[<ffffffff812e205c>] scsi_next_command+0x36/0x46
[<ffffffff812e24dc>] scsi_io_completion+0x426/0x4a9
[<ffffffff812dc0b2>] scsi_finish_command+0xaf/0xb8
[<ffffffff812e200c>] scsi_softirq_done+0xdd/0xe5
[<ffffffff811d79c6>] blk_done_softirq+0x76/0x8a
[<ffffffff8105a28d>] __do_softirq+0x98/0x136
[<ffffffff814e649c>] call_softirq+0x1c/0x30
[<ffffffff8102f187>] do_softirq+0x38/0x81
[<ffffffff8105a596>] irq_exit+0x4e/0xb6
[<ffffffff8102ee9e>] do_IRQ+0x97/0xae
[<ffffffff814e49f0>] common_interrupt+0x70/0x70
<EOI> [<ffffffff814e4a8e>] ? retint_swapgs+0xe/0x13
---[ end trace 61fdaa1b260613d1 ]---
Hugh
next prev parent reply other threads:[~2011-12-28 8:33 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-21 6:47 linux-next: Tree for Dec 21 Stephen Rothwell
2011-12-21 20:11 ` linux-next: Tree for Dec 21 (xen) Randy Dunlap
2011-12-21 19:30 ` Konrad Rzeszutek Wilk
2011-12-21 20:32 ` [PATCH] usb: fix renesas mod_gadget printk format warning Randy Dunlap
2011-12-21 21:16 ` Felipe Balbi
2011-12-21 22:19 ` Randy Dunlap
2011-12-21 21:24 ` Greg KH
2011-12-21 23:15 ` linux-next: Tree for Dec 21 Andrew Morton
2011-12-22 23:08 ` Andrew Morton
2011-12-22 23:20 ` Tejun Heo
2011-12-22 23:24 ` Andrew Morton
2011-12-22 23:38 ` Tejun Heo
2011-12-22 23:44 ` Andrew Morton
2011-12-22 23:46 ` Tejun Heo
2011-12-23 0:42 ` Tejun Heo
2011-12-24 5:13 ` Hugh Dickins
2011-12-25 1:02 ` [PATCH block/for-3.3/core] block: an exiting task should be allowed to create io_context Tejun Heo
2011-12-25 13:29 ` Jens Axboe
2011-12-27 22:07 ` Andrew Morton
2011-12-28 8:33 ` Hugh Dickins [this message]
2011-12-28 16:48 ` Tejun Heo
2011-12-28 17:50 ` Hugh Dickins
2011-12-28 17:55 ` Tejun Heo
2011-12-28 21:19 ` Tejun Heo
2012-01-03 17:35 ` Tejun Heo
2012-01-03 17:59 ` Tejun Heo
2012-01-03 20:09 ` Tejun Heo
2012-01-03 20:20 ` Jens Axboe
2012-01-03 22:13 ` Tejun Heo
2012-01-03 22:35 ` Tejun Heo
2012-01-05 1:24 ` Tejun Heo
2012-01-05 18:36 ` Hugh Dickins
2012-01-05 18:38 ` Tejun Heo
2012-01-06 2:17 ` [PATCH block:for-3.3/core] cfq: merged request shouldn't jump to a different cfqq Tejun Heo
2012-01-06 2:36 ` Tejun Heo
2012-01-06 3:14 ` Shaohua Li
2012-01-06 3:04 ` Tejun Heo
2012-01-06 3:30 ` Tejun Heo
2012-01-06 3:52 ` [PATCH block:for-3.3/core] block: disable ELEVATOR_INSERT_SORT_MERGE Tejun Heo
2012-01-06 4:19 ` Shaohua Li
2012-01-06 4:38 ` Tejun Heo
2012-01-06 8:15 ` Shaohua Li
2012-01-06 15:34 ` Tejun Heo
2012-01-06 3:34 ` [PATCH block:for-3.3/core] cfq: merged request shouldn't jump to a different cfqq Shaohua Li
2012-01-06 3:22 ` Tejun Heo
2012-01-06 4:15 ` Shaohua Li
2012-01-06 4:40 ` Tejun Heo
2012-01-06 2:47 ` Shaohua Li
2011-12-25 16:08 ` linux-next: Tree for Dec 21 Sedat Dilek
2011-12-25 23:55 ` Stephen Rothwell
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=alpine.LSU.2.00.1112280010550.1398@eggly.anvils \
--to=hughd@google.com \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
--cc=tj@kernel.org \
--cc=x86@kernel.org \
/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