Re: [Qemu-devel] [PATCH V2] vnc: destroy server surface if no client is connected

2015-10-05 Thread Peter Lieven
Am 02.10.2015 um 09:36 schrieb Gerd Hoffmann: Hi, Please have a look at: https://github.com/plieven/qemu/tree/vnc-next-2.0 Moving code to buf_adj_size and buf_req_size should go to a separate patch. The avg_size logic needs some description. Please have a look at: https://github.com/pl

Re: [Qemu-devel] [PATCH V2] vnc: destroy server surface if no client is connected

2015-10-02 Thread Gerd Hoffmann
Hi, > > Picked up the "recycle empty vs->output buffer" patch. > > please stash the dtc part from that Patch. Already done, git rebase handled it for me ;) cheers, Gerd

Re: [Qemu-devel] [PATCH V2] vnc: destroy server surface if no client is connected

2015-10-02 Thread Peter Lieven
> Am 02.10.2015 um 09:36 schrieb Gerd Hoffmann : > > Hi, > >> Please have a look at: >> >> https://github.com/plieven/qemu/tree/vnc-next-2.0 > > Moving code to buf_adj_size and buf_req_size should go to a separate > patch. > > The avg_size logic needs some description. will send monday. >

Re: [Qemu-devel] [PATCH V2] vnc: destroy server surface if no client is connected

2015-10-02 Thread Gerd Hoffmann
Hi, > Please have a look at: > > https://github.com/plieven/qemu/tree/vnc-next-2.0 Moving code to buf_adj_size and buf_req_size should go to a separate patch. The avg_size logic needs some description. Picked up the "recycle empty vs->output buffer" patch. cheers, Gerd

Re: [Qemu-devel] [PATCH V2] vnc: destroy server surface if no client is connected

2015-10-01 Thread Peter Lieven
Am 29.09.2015 um 16:08 schrieb Gerd Hoffmann: > Hi, > >> what about Recycling the output buffer as worker thread buffer? > You can't do that as vs is allocated on the stack, therefore not valid > any more when vnc_worker_thread_loop returns. > > >> about shrinking: I had the idea to count the num

Re: [Qemu-devel] [PATCH V2] vnc: destroy server surface if no client is connected

2015-09-30 Thread Peter Lieven
> Am 29.09.2015 um 16:08 schrieb Gerd Hoffmann : > > Hi, > >> what about Recycling the output buffer as worker thread buffer? > > You can't do that as vs is allocated on the stack, therefore not valid > any more when vnc_worker_thread_loop returns. why not? buffer_move_free only moves the hea

Re: [Qemu-devel] [PATCH V2] vnc: destroy server surface if no client is connected

2015-09-30 Thread Gerd Hoffmann
Hi, > what about Recycling the output buffer as worker thread buffer? You can't do that as vs is allocated on the stack, therefore not valid any more when vnc_worker_thread_loop returns. > about shrinking: I had the idea to count the number of times the buffer was > (significantly) too big a

Re: [Qemu-devel] [PATCH V2] vnc: destroy server surface if no client is connected

2015-09-29 Thread Peter Lieven
> Am 29.09.2015 um 14:49 schrieb Gerd Hoffmann : > > On Di, 2015-09-29 at 14:41 +0200, Peter Lieven wrote: >>> Am 29.09.2015 um 12:28 schrieb Gerd Hoffmann : >>> >>> Hi, >>> -graphic_hw_update(vd->dcl.con); +if (first_client) { +/* set/restore the correct surface

Re: [Qemu-devel] [PATCH V2] vnc: destroy server surface if no client is connected

2015-09-29 Thread Gerd Hoffmann
On Di, 2015-09-29 at 14:41 +0200, Peter Lieven wrote: > > Am 29.09.2015 um 12:28 schrieb Gerd Hoffmann : > > > > Hi, > > > >> -graphic_hw_update(vd->dcl.con); > >> +if (first_client) { > >> +/* set/restore the correct surface in the VNC server */ > >> +console_select(0);

Re: [Qemu-devel] [PATCH V2] vnc: destroy server surface if no client is connected

2015-09-29 Thread Peter Lieven
> Am 29.09.2015 um 12:28 schrieb Gerd Hoffmann : > > Hi, > >> -graphic_hw_update(vd->dcl.con); >> +if (first_client) { >> +/* set/restore the correct surface in the VNC server */ >> +console_select(0); > > Nah, that has unwanted side effects. okay, ill try to respin wi

Re: [Qemu-devel] [PATCH V2] vnc: destroy server surface if no client is connected

2015-09-29 Thread Gerd Hoffmann
Hi, > -graphic_hw_update(vd->dcl.con); > +if (first_client) { > +/* set/restore the correct surface in the VNC server */ > +console_select(0); Nah, that has unwanted side effects. Pushed some patches to git://git.kraxel.org/qemu rebase/ui-vnc-next, could you have a look

[Qemu-devel] [PATCH V2] vnc: destroy server surface if no client is connected

2015-09-25 Thread Peter Lieven
if no client is connected there is no need to keep the server surface. Throw it away to save memory. Signed-off-by: Peter Lieven --- v1->v2: don't create a dummy surface just set vd->server = NULL [Gerd] ui/vnc.c | 38 +- 1 file changed, 33 insertions(+), 5 d