From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Amit Shah <amit.shah@redhat.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
Alexander Graf <agraf@suse.de>
Subject: Re: [Qemu-devel] [PATCHv2] Fix virtio-console failure on unconnected pty
Date: Thu, 29 Dec 2011 16:14:13 +0100 [thread overview]
Message-ID: <4EFC83C5.5010903@de.ibm.com> (raw)
In-Reply-To: <20111229145602.GE4576@amit.redhat.com>
On 29/12/11 15:56, Amit Shah wrote:
> On (Thu) 29 Dec 2011 [15:32:14], Christian Borntraeger wrote:
>>> port->throttled never becomes true for qemu.
>>
>> Huh? What did I miss below?
>>
>> if (ret == -EAGAIN || (ret >= 0 && ret < buf_size)) {
>> virtio_serial_throttle_port(port, true);
>
> 'ret' here is the return value from info->have_data(), which is
> hw/virtio-console.c:flush_buf(). That function returns the value that
> qemu_chr_fe_write() returns, which is qemu-char.c:send_all() for pty,
> tcp, unix sockets. send_all() just keeps spinning here if it can't
> write, doesn't signal EAGAIN at all (or even a partial write).
>
> Can you print out the return values of have_data to check what's going
> on? Maybe you're hitting a case I never hit earlier and throttling
> indeed does get enabled?
ret is 0, see below for the gdb output. send_all does indeed break out of the
loop in case of 0.
(gdb) bt
#0 do_flush_queued_data (port=0x8130a910, vq=0x813091e0, vdev=0x81309060) at /home/cborntra/REPOS/qemu/hw/virtio-serial-bus.c:166
#1 0x000000008022641e in handle_output (vdev=0x81309060, vq=0x813091e0) at /home/cborntra/REPOS/qemu/hw/virtio-serial-bus.c:481
#2 0x000000008022ac34 in virtio_queue_notify_vq (vq=0x813091e0) at /home/cborntra/REPOS/qemu/hw/virtio.c:632
#3 0x000000008022acc2 in virtio_queue_notify (vdev=0x81309060, n=1) at /home/cborntra/REPOS/qemu/hw/virtio.c:638
#4 0x00000000801e7168 in s390_virtio_hypercall (env=0x812f8170, mem=2097954816, hypercall=0) at /home/cborntra/REPOS/qemu/hw/s390-virtio.c:86
#5 0x00000000801bf3d4 in handle_hypercall (env=0x812f8170, run=0x20000028000) at /home/cborntra/REPOS/qemu/target-s390x/kvm.c:270
#6 0x00000000801bf48a in handle_diag (env=0x812f8170, run=0x20000028000, ipb_code=1280) at /home/cborntra/REPOS/qemu/target-s390x/kvm.c:281
#7 0x00000000801bfa3e in handle_instruction (env=0x812f8170, run=0x20000028000) at /home/cborntra/REPOS/qemu/target-s390x/kvm.c:397
#8 0x00000000801bfb76 in handle_intercept (env=0x812f8170) at /home/cborntra/REPOS/qemu/target-s390x/kvm.c:420
#9 0x00000000801bfcd2 in kvm_arch_handle_exit (env=0x812f8170, run=0x20000028000) at /home/cborntra/REPOS/qemu/target-s390x/kvm.c:452
#10 0x00000000801bd774 in kvm_cpu_exec (env=0x812f8170) at /home/cborntra/REPOS/qemu/kvm-all.c:1021
#11 0x0000000080181470 in qemu_kvm_cpu_thread_fn (arg=0x812f8170) at /home/cborntra/REPOS/qemu/cpus.c:740
#12 0x000002000043240e in start_thread () from /lib64/libpthread.so.0
#13 0x000002000055469a in thread_start () from /lib64/libc.so.6
(gdb) print ret
$3 = 0
next prev parent reply other threads:[~2011-12-29 15:15 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-15 12:44 [Qemu-devel] [RFC] virtio-console fails on unconnected pty Christian Borntraeger
2011-12-16 9:23 ` Amit Shah
2011-12-29 12:47 ` [Qemu-devel] [PATCHv2] Fix virtio-console failure " Christian Borntraeger
2011-12-29 13:27 ` Amit Shah
2011-12-29 13:39 ` Andreas Färber
2011-12-29 14:04 ` Amit Shah
2011-12-29 14:16 ` Christian Borntraeger
2011-12-29 14:19 ` Christian Borntraeger
2011-12-29 14:26 ` Amit Shah
2011-12-29 14:32 ` Christian Borntraeger
2011-12-29 14:56 ` Amit Shah
2011-12-29 15:14 ` Christian Borntraeger [this message]
2011-12-29 15:14 ` Amit Shah
2012-01-02 15:34 ` Alexander Graf
2012-01-02 15:41 ` Christian Borntraeger
2012-01-02 16:55 ` Alexander Graf
2012-01-03 15:49 ` Amit Shah
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=4EFC83C5.5010903@de.ibm.com \
--to=borntraeger@de.ibm.com \
--cc=agraf@suse.de \
--cc=amit.shah@redhat.com \
--cc=qemu-devel@nongnu.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).