Re: [Qemu-devel] [PATCH 2/2] Monitor: Make output buffer dynamic

2013-04-02 Thread Gerd Hoffmann
On 03/27/13 07:45, Wenchao Xia wrote: > Hi, Luiz > Personally I hope reduce the dynamic allocated buffer which brings > fragments and unexpected memory grow. It's a tradeoff. We can reduce the dynamic allocation, by simply reusing the qstring instead of allocation a new one (after complete/part

Re: [Qemu-devel] [PATCH 2/2] Monitor: Make output buffer dynamic

2013-03-27 Thread Wenchao Xia
于 2013-3-27 20:27, Luiz Capitulino 写道: On Wed, 27 Mar 2013 14:45:53 +0800 Wenchao Xia wrote: Hi, Luiz Personally I hope reduce the dynamic allocated buffer which brings fragments and unexpected memory grow. Instead, how about sacrifice some time to wait output complete, since monitor is not

Re: [Qemu-devel] [PATCH 2/2] Monitor: Make output buffer dynamic

2013-03-27 Thread Luiz Capitulino
On Wed, 27 Mar 2013 14:45:53 +0800 Wenchao Xia wrote: > Hi, Luiz > Personally I hope reduce the dynamic allocated buffer which brings > fragments and unexpected memory grow. Instead, how about sacrifice > some time to wait output complete, since monitor is not time critical? > in this case stat

Re: [Qemu-devel] [PATCH 2/2] Monitor: Make output buffer dynamic

2013-03-26 Thread Wenchao Xia
Hi, Luiz Personally I hope reduce the dynamic allocated buffer which brings fragments and unexpected memory grow. Instead, how about sacrifice some time to wait output complete, since monitor is not time critical? in this case static buffer's size can decide how many work can be postponded. Follo

Re: [Qemu-devel] [PATCH 2/2] Monitor: Make output buffer dynamic

2013-03-25 Thread Luiz Capitulino
On Mon, 25 Mar 2013 22:07:36 +0100 Paolo Bonzini wrote: > Il 25/03/2013 20:40, Luiz Capitulino ha scritto: > > Commit f628926bb423fa8a7e0b114511400ea9df38b76a changed monitor_flush() > > to retry on qemu_chr_fe_write() errors. However, the Monitor's output > > buffer can keep growing while the re

Re: [Qemu-devel] [PATCH 2/2] Monitor: Make output buffer dynamic

2013-03-25 Thread Paolo Bonzini
Il 25/03/2013 20:40, Luiz Capitulino ha scritto: > Commit f628926bb423fa8a7e0b114511400ea9df38b76a changed monitor_flush() > to retry on qemu_chr_fe_write() errors. However, the Monitor's output > buffer can keep growing while the retry is not issued and this can > cause the buffer to overflow. >

[Qemu-devel] [PATCH 2/2] Monitor: Make output buffer dynamic

2013-03-25 Thread Luiz Capitulino
Commit f628926bb423fa8a7e0b114511400ea9df38b76a changed monitor_flush() to retry on qemu_chr_fe_write() errors. However, the Monitor's output buffer can keep growing while the retry is not issued and this can cause the buffer to overflow. To reproduce this issue, just start qemu and type on the Mo