From: Kevin Wolf <kwolf@redhat.com>
To: Peter Lieven <pl@kamp.de>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
jsnow@redhat.com, qemu-devel <qemu-devel@nongnu.org>,
qemu block <qemu-block@nongnu.org>,
Stefan Hajnoczi <stefanha@gmail.com>
Subject: Re: [Qemu-devel] [Qemu-block] RFC cdrom in own thread?
Date: Thu, 18 Jun 2015 10:42:41 +0200 [thread overview]
Message-ID: <20150618084241.GC4270@noname.redhat.com> (raw)
In-Reply-To: <558281B2.6020905@kamp.de>
Am 18.06.2015 um 10:30 hat Peter Lieven geschrieben:
> Am 18.06.2015 um 09:45 schrieb Kevin Wolf:
> >Am 18.06.2015 um 09:12 hat Peter Lieven geschrieben:
> >>Thread 2 (Thread 0x7ffff5550700 (LWP 2636)):
> >>#0 0x00007ffff5d87aa3 in ppoll () from /lib/x86_64-linux-gnu/libc.so.6
> >>No symbol table info available.
> >>#1 0x0000555555955d91 in qemu_poll_ns (fds=0x5555563889c0, nfds=3,
> >> timeout=4999424576) at qemu-timer.c:326
> >> ts = {tv_sec = 4, tv_nsec = 999424576}
> >> tvsec = 4
> >>#2 0x0000555555956feb in aio_poll (ctx=0x5555563528e0, blocking=true)
> >> at aio-posix.c:231
> >> node = 0x0
> >> was_dispatching = false
> >> ret = 1
> >> progress = false
> >>#3 0x000055555594aeed in bdrv_prwv_co (bs=0x55555637eae0, offset=4292007936,
> >> qiov=0x7ffff554f760, is_write=false, flags=0) at block.c:2699
> >> aio_context = 0x5555563528e0
> >> co = 0x5555563888a0
> >> rwco = {bs = 0x55555637eae0, offset = 4292007936,
> >> qiov = 0x7ffff554f760, is_write = false, ret = 2147483647, flags = 0}
> >>#4 0x000055555594afa9 in bdrv_rw_co (bs=0x55555637eae0, sector_num=8382828,
> >> buf=0x7ffff44cc800 "(", nb_sectors=4, is_write=false, flags=0)
> >> at block.c:2722
> >> qiov = {iov = 0x7ffff554f780, niov = 1, nalloc = -1, size = 2048}
> >> iov = {iov_base = 0x7ffff44cc800, iov_len = 2048}
> >>#5 0x000055555594b008 in bdrv_read (bs=0x55555637eae0, sector_num=8382828,
> >> buf=0x7ffff44cc800 "(", nb_sectors=4) at block.c:2730
> >>No locals.
> >>#6 0x000055555599acef in blk_read (blk=0x555556376820, sector_num=8382828,
> >> buf=0x7ffff44cc800 "(", nb_sectors=4) at block/block-backend.c:404
> >>No locals.
> >>#7 0x0000555555833ed2 in cd_read_sector (s=0x555556408f88, lba=2095707,
> >> buf=0x7ffff44cc800 "(", sector_size=2048) at hw/ide/atapi.c:116
> >> ret = 32767
> >Here is the problem: The ATAPI emulation uses synchronous blk_read()
> >instead of the AIO or coroutine interfaces. This means that it keeps
> >polling for request completion while it holds the BQL until the request
> >is completed.
>
> I will look at this.
>
> >
> >We can (and should) fix that, otherwise the VCPUs is blocked while we're
> >reading from the image, even without a hang. It doesn't fully fix your
> >problem, though, as bdrv_drain_all() and friends still exist.
>
> Any idea which commands actually call bdrv_drain_alll?
At least 'stop' and all commands changing the BDS graph (block jobs,
snapshots, commit, etc.). For a full list, I would have to inspect each
command in the code.
The guest can even trigger bdrv_drain_all() by stopping a running DMA
operation.
Kevin
next prev parent reply other threads:[~2015-06-18 8:42 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <55803637.3060607@kamp.de>
2015-06-16 15:34 ` [Qemu-devel] [Qemu-block] RFC cdrom in own thread? Stefan Hajnoczi
2015-06-17 8:35 ` Kevin Wolf
2015-06-18 6:03 ` Peter Lieven
2015-06-18 6:57 ` Markus Armbruster
2015-06-18 6:39 ` Peter Lieven
2015-06-18 6:59 ` Paolo Bonzini
2015-06-18 7:03 ` Peter Lieven
2015-06-18 7:12 ` Peter Lieven
2015-06-18 7:45 ` Kevin Wolf
2015-06-18 8:30 ` Peter Lieven
2015-06-18 8:42 ` Kevin Wolf [this message]
2015-06-18 9:29 ` Peter Lieven
2015-06-18 9:36 ` Stefan Hajnoczi
2015-06-18 9:53 ` Peter Lieven
2015-06-19 13:14 ` Peter Lieven
2015-06-22 9:25 ` Stefan Hajnoczi
2015-06-22 13:09 ` Peter Lieven
2015-06-22 21:54 ` John Snow
2015-06-23 6:36 ` Peter Lieven
2015-08-14 13:43 ` Peter Lieven
2015-08-14 14:08 ` Kevin Wolf
2015-08-14 14:21 ` Peter Lieven
2015-08-14 14:45 ` Peter Lieven
2015-08-15 19:02 ` Peter Lieven
2015-06-18 10:17 ` Peter Lieven
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=20150618084241.GC4270@noname.redhat.com \
--to=kwolf@redhat.com \
--cc=jsnow@redhat.com \
--cc=pbonzini@redhat.com \
--cc=pl@kamp.de \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
/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).