From: Tim Small <tim@seoss.co.uk>
To: Jens Axboe <axboe@fb.com>, Christoph Hellwig <hch@infradead.org>
Cc: tim@buttersideup.com, Wakko Warner <wakko@animx.eu.org>,
linux-scsi@vger.kernel.org, Borislav Petkov <bp@alien8.de>,
Tim Waugh <tim@cyberelk.net>
Subject: Re: [PATCH 0/4] Fix performance burning or extracting audio etc. from multiple optical drives.
Date: Wed, 26 Nov 2014 15:33:49 +0000 [thread overview]
Message-ID: <5475F2DD.9030906@seoss.co.uk> (raw)
In-Reply-To: <5474AE9B.40104@fb.com>
On 25/11/14 16:30, Jens Axboe wrote:
> do we really need to do paride here?
I did consider this, but I made the change there too on the basis that:
. paride has received a few commits this year (and is listed as being
maintained)
. The change is trivial
. It fixes a performance regression which was introduced during the BKL
removal (mutex being retained by sleeping processes).
I'm happy to drop it, if you prefer.
> Patches 2-4 have identical subjects, and no commit message...
Sorry about that, will fix it with next version.
Having just seen this thread from 2013:
http://permalink.gmane.org/gmane.linux.scsi/79483
I decided to exercise the eject code path a bit more by triggering
simultaneous eject commands on all 11 optical drives in my test box,
followed by simultaneous close-tray commands, repeatedly.
I haven't been able to reproduce the error reported in that email, but
from observing the behaviour of the drives it looks like access to pata
drives is being serialising elsewhere, so the issue in that link may
have been fixed?
Unfortunately running these tests did eventually make all further
attempts to open /dev/sr* block on my test box.
I've stared at the code for a while, but not making any headway
currently, except that a blocking blk_execute_rq (called by
test_unit_ready) is then causing all over cdrom open/close calls to
block (because sr_mutex is held by sr_block_open(), and in turn calls
check_disk_change... scsi_test_unit_ready).
How do I work out why blk_execute_rq is blocking?
# ps -l 3779 2383 3780
F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD
1 D 0 2383 2 0 80 0 - 0 blk_ex ? 0:00 [kworker/1:2]
0 D 0 3779 1034 0 80 0 - 1057 blk_ex pts/0 0:00 eject -t /dev/sr7
0 D 0 3780 1034 0 80 0 - 0 sr_blo pts/0 0:00 [eject]
/proc/3779/stack-[<ffffffff812e47cb>] blk_execute_rq+0x16b/0x210
/proc/3779/stack-[<ffffffffa0291cb1>] scsi_execute+0x141/0x1f0 [scsi_mod]
/proc/3779/stack-[<ffffffffa0293e1e>] scsi_execute_req_flags+0x8e/0x100 [scsi_mod]
/proc/3779/stack-[<ffffffffa02944f3>] scsi_test_unit_ready+0x83/0x130 [scsi_mod]
/proc/3779/stack:[<ffffffffa05a9a7c>] sr_check_events+0x13c/0x310 [sr_mod]
/proc/3779/stack-[<ffffffffa06cd05c>] cdrom_check_events+0x1c/0x40 [cdrom]
/proc/3779/stack:[<ffffffffa05a9ecd>] sr_block_check_events+0x2d/0x30 [sr_mod]
/proc/3779/stack-[<ffffffff812eed41>] disk_check_events+0x51/0x170
/proc/3779/stack-[<ffffffff812f068c>] disk_clear_events+0x6c/0x130
/proc/3779/stack-[<ffffffff81227150>] check_disk_change+0x30/0x80
/proc/3779/stack-[<ffffffffa06cfd9a>] cdrom_open+0x4a/0xba0 [cdrom]
/proc/3779/stack:[<ffffffffa05aa6c2>] sr_block_open+0x92/0x130 [sr_mod]
/proc/3779/stack-[<ffffffff81227b71>] __blkdev_get+0xd1/0x4b0
/proc/3779/stack-[<ffffffff81227f91>] blkdev_get+0x41/0x3e0
/proc/3779/stack-[<ffffffff812283fe>] blkdev_open+0x6e/0x90
/proc/3779/stack-[<ffffffff811e6cbd>] do_dentry_open+0x1ed/0x360
/proc/3779/stack-[<ffffffff811e6f99>] vfs_open+0x49/0x50
/proc/3779/stack-[<ffffffff811fa849>] do_last+0x239/0x1520
/proc/3779/stack-[<ffffffff811fbbe7>] path_openat+0xb7/0x6a0
/proc/3779/stack-[<ffffffff811fd3ea>] do_filp_open+0x3a/0xb0
/proc/3779/stack-[<ffffffff811e896c>] do_sys_open+0x12c/0x220
/proc/3779/stack-[<ffffffff811e8a7e>] SyS_open+0x1e/0x20
/proc/2383/stack-[<ffffffff812e47cb>] blk_execute_rq+0x16b/0x210
/proc/2383/stack-[<ffffffffa0291cb1>] scsi_execute+0x141/0x1f0 [scsi_mod]
/proc/2383/stack-[<ffffffffa0293e1e>] scsi_execute_req_flags+0x8e/0x100 [scsi_mod]
/proc/2383/stack-[<ffffffffa02944f3>] scsi_test_unit_ready+0x83/0x130 [scsi_mod]
/proc/2383/stack:[<ffffffffa05a9a7c>] sr_check_events+0x13c/0x310 [sr_mod]
/proc/2383/stack-[<ffffffffa06cd05c>] cdrom_check_events+0x1c/0x40 [cdrom]
/proc/2383/stack:[<ffffffffa05a9ecd>] sr_block_check_events+0x2d/0x30 [sr_mod]
/proc/2383/stack-[<ffffffff812eed41>] disk_check_events+0x51/0x170
/proc/2383/stack-[<ffffffff812eee7c>] disk_events_workfn+0x1c/0x20
/proc/2383/stack-[<ffffffff8108b91f>] process_one_work+0x1df/0x520
/proc/2383/stack-[<ffffffff8108bf3b>] worker_thread+0x6b/0x4a0
/proc/2383/stack-[<ffffffff8109130b>] kthread+0x10b/0x130
/proc/2383/stack-[<ffffffff815b8afc>] ret_from_fork+0x7c/0xb0
/proc/2383/stack-[<ffffffffffffffff>] 0xffffffffffffffff
/proc/3780/stack:[<ffffffffa05aa604>] sr_block_release+0x24/0x50 [sr_mod]
/proc/3780/stack-[<ffffffff81227a65>] __blkdev_put+0x185/0x1c0
/proc/3780/stack-[<ffffffff81228472>] blkdev_put+0x52/0x180
/proc/3780/stack-[<ffffffff81228658>] blkdev_close+0x28/0x30
/proc/3780/stack-[<ffffffff811eb4e5>] __fput+0xf5/0x210
/proc/3780/stack-[<ffffffff811eb64e>] ____fput+0xe/0x10
/proc/3780/stack-[<ffffffff8108f824>] task_work_run+0xc4/0xf0
/proc/3780/stack-[<ffffffff810734fa>] do_exit+0x3da/0xb70
/proc/3780/stack-[<ffffffff81073d34>] do_group_exit+0x54/0xe0
/proc/3780/stack-[<ffffffff81073dd4>] SyS_exit_group+0x14/0x20
/proc/3780/stack-[<ffffffff815b8bad>] system_call_fastpath+0x16/0x1b
# grep -l scsi_exec /proc/*/stack
/proc/2383/stack
/proc/3779/stack
# grep -l ioctl /proc/*/stack
# grep -l blk_execute /proc/*/stack
/proc/2383/stack
/proc/3779/stack
#
Cheers,
Tim.
next prev parent reply other threads:[~2014-11-26 15:34 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-06 13:25 Very slow throughput when using cdparanoia on two SATA CDROM drives with /dev/sr but not /dev/sg Tim Small
2014-11-07 21:37 ` Wakko Warner
2014-11-20 6:34 ` Christoph Hellwig
2014-11-20 8:16 ` Tim Small
2014-11-21 10:02 ` Christoph Hellwig
2014-11-25 14:09 ` [PATCH 0/4] Fix performance burning or extracting audio etc. from multiple optical drives Tim Small
2014-11-25 16:26 ` Christoph Hellwig
2014-11-25 16:30 ` Jens Axboe
2014-11-25 16:32 ` Christoph Hellwig
2014-11-25 16:36 ` Jens Axboe
2014-11-26 15:33 ` Tim Small [this message]
2014-11-26 20:34 ` Tim Small
2014-11-26 23:01 ` Julian Calaby
2014-11-27 7:08 ` Tim Small
2015-11-05 1:38 ` Wakko Warner
2015-11-05 9:36 ` Tim Small
2014-11-25 14:09 ` [PATCH 1/4] enable cdrom_ioctl() to be called without holding ex-BKL mutexes Tim Small
2014-11-25 14:09 ` [PATCH 2/4] Remove ex-BKL lock from ioctl path; fix simultaneous record on >1 drive Tim Small
2014-11-25 14:09 ` [PATCH 3/4] " Tim Small
2014-11-25 14:09 ` [PATCH 4/4] " Tim Small
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=5475F2DD.9030906@seoss.co.uk \
--to=tim@seoss.co.uk \
--cc=axboe@fb.com \
--cc=bp@alien8.de \
--cc=hch@infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=tim@buttersideup.com \
--cc=tim@cyberelk.net \
--cc=wakko@animx.eu.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;
as well as URLs for NNTP newsgroup(s).