[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH V2] vnc: destroy server surface if no client is
From: |
Peter Lieven |
Subject: |
Re: [Qemu-devel] [PATCH V2] vnc: destroy server surface if no client is connected |
Date: |
Tue, 29 Sep 2015 16:36:24 +0200 |
> Am 29.09.2015 um 16:08 schrieb Gerd Hoffmann <address@hidden>:
>
> 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 heap allocated buffer allocation not
the Buffer structure itself.
>
>
>> about shrinking: I had the idea to count the number of times the buffer was
>> (significantly) too big and only shrink if that counter has reached a
>> reasonable value. and reset that counter to zero if the buffer has the right
>> size.
>>
>> i would check this in qio_buffer_resize. as you suggested earlier.
>
> Not sure whenever it is a good idea to do that on every reserve call.
> Maybe better place shrink calls in places where you know it is worth
> checking, to have lower overhead.
>
> Patches are welcome in any case ;)
>
will have a look.
Peter
- Re: [Qemu-devel] [PATCH V2] vnc: destroy server surface if no client is connected, Gerd Hoffmann, 2015/10/03
- Re: [Qemu-devel] [PATCH V2] vnc: destroy server surface if no client is connected, Peter Lieven, 2015/10/05
- Re: [Qemu-devel] [PATCH V2] vnc: destroy server surface if no client is connected, Gerd Hoffmann, 2015/10/05
- Re: [Qemu-devel] [PATCH V2] vnc: destroy server surface if no client is connected, Peter Lieven, 2015/10/07
- Re: [Qemu-devel] [PATCH V2] vnc: destroy server surface if no client is connected, Gerd Hoffmann, 2015/10/07
- Re: [Qemu-devel] [PATCH V2] vnc: destroy server surface if no client is connected,
Peter Lieven <=
- Re: [Qemu-devel] [PATCH V2] vnc: destroy server surface if no client is connected, Peter Lieven, 2015/10/08
- Re: [Qemu-devel] [PATCH V2] vnc: destroy server surface if no client is connected, Gerd Hoffmann, 2015/10/08
- Re: [Qemu-devel] [PATCH V2] vnc: destroy server surface if no client is connected, Peter Lieven, 2015/10/08
- Re: [Qemu-devel] [PATCH V2] vnc: destroy server surface if no client is connected, Gerd Hoffmann, 2015/10/08
- Re: [Qemu-devel] [PATCH V2] vnc: destroy server surface if no client is connected, Peter Lieven, 2015/10/08