Re: [Qemu-devel] Hight Processor time of Socket communciation

2017-04-19 Thread Peter Maydell
On 19 April 2017 at 14:34, Jiahuan Zhang wrote: > But from the source code, I found the main characteristic of virtio-serial > is that, > virtio-serial can create multiple serial ports and each port has a pair of > control virt-queues and > a pair of guest input/output virt-queues. Its main chara

Re: [Qemu-devel] Hight Processor time of Socket communciation

2017-04-19 Thread Jiahuan Zhang
On 19 April 2017 at 12:09, Peter Maydell wrote: > On 19 April 2017 at 11:04, Jiahuan Zhang wrote: > > Okay. Thank you for pointing this out. > > I would like to make a new serial device based on pl011, > > but containing a buffer for guest-to-host data transfer. > > As I've said, the PL011 is in

Re: [Qemu-devel] Hight Processor time of Socket communciation

2017-04-19 Thread Peter Maydell
On 19 April 2017 at 11:04, Jiahuan Zhang wrote: > Okay. Thank you for pointing this out. > I would like to make a new serial device based on pl011, > but containing a buffer for guest-to-host data transfer. As I've said, the PL011 is inherently byte at a time. If you want better than that, I reco

Re: [Qemu-devel] Hight Processor time of Socket communciation

2017-04-19 Thread Jiahuan Zhang
On 19 April 2017 at 11:55, Peter Maydell wrote: > On 19 April 2017 at 10:25, Jiahuan Zhang wrote: > > On 19 April 2017 at 11:15, Peter Maydell > wrote: > >> What is happening is that the guest kernel's serial driver > >> has a loop that (simplified) looks like this: > >> > >> do { > >>

Re: [Qemu-devel] Hight Processor time of Socket communciation

2017-04-19 Thread Peter Maydell
On 19 April 2017 at 10:25, Jiahuan Zhang wrote: > On 19 April 2017 at 11:15, Peter Maydell wrote: >> What is happening is that the guest kernel's serial driver >> has a loop that (simplified) looks like this: >> >> do { >> if (pl011_read(REG_FR) & FR_TXFF) >> break; /* fifo full

Re: [Qemu-devel] Hight Processor time of Socket communciation

2017-04-19 Thread Jiahuan Zhang
On 19 April 2017 at 11:15, Peter Maydell wrote: > On 19 April 2017 at 09:56, Jiahuan Zhang wrote: > > Do you mean that it is reasonable for QEMU emulation consumes high CPU > time > > when doing host-guest interaction, since the interaction calls many QEMU > > codes in the background? > > > Sinc

Re: [Qemu-devel] Hight Processor time of Socket communciation

2017-04-19 Thread Peter Maydell
On 19 April 2017 at 09:56, Jiahuan Zhang wrote: > Do you mean that it is reasonable for QEMU emulation consumes high CPU time > when doing host-guest interaction, since the interaction calls many QEMU > codes in the background? > Since my guest app is rather simple and no while() is included, acc

Re: [Qemu-devel] Hight Processor time of Socket communciation

2017-04-19 Thread Jiahuan Zhang
On 18 April 2017 at 18:26, Peter Maydell wrote: > On 18 April 2017 at 17:19, Jiahuan Zhang wrote: > > Dear QEMU developers, > > I am measuring the processor time for guest-host communication via > socket. > > The guest app is to write a 5M image to a serial device. > > The serial deivce is redir

Re: [Qemu-devel] Hight Processor time of Socket communciation

2017-04-18 Thread Peter Maydell
On 18 April 2017 at 17:19, Jiahuan Zhang wrote: > Dear QEMU developers, > I am measuring the processor time for guest-host communication via socket. > The guest app is to write a 5M image to a serial device. > The serial deivce is redirected to the socket in the command line. > The host app is to

[Qemu-devel] Hight Processor time of Socket communciation

2017-04-18 Thread Jiahuan Zhang
Dear QEMU developers, I am measuring the processor time for guest-host communication via socket. The guest app is to write a 5M image to a serial device. The serial deivce is redirected to the socket in the command line. The host app is to receive the data via socket until the peer closes the conne