From: Gerd Hoffmann <kraxel@redhat.com>
To: Peter Lieven <pl@kamp.de>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH V2] vnc: destroy server surface if no client is connected
Date: Tue, 29 Sep 2015 16:08:23 +0200 [thread overview]
Message-ID: <1443535703.21557.63.camel@redhat.com> (raw)
In-Reply-To: <AD81571E-67EE-4DB2-822B-4BD9B16756C2@kamp.de>
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 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 ;)
cheers,
Gerd
next prev parent reply other threads:[~2015-09-29 14:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-25 18:36 [Qemu-devel] [PATCH V2] vnc: destroy server surface if no client is connected Peter Lieven
2015-09-29 10:28 ` Gerd Hoffmann
2015-09-29 12:41 ` Peter Lieven
2015-09-29 12:49 ` Gerd Hoffmann
2015-09-29 13:31 ` Peter Lieven
2015-09-29 14:08 ` Gerd Hoffmann [this message]
2015-09-29 14:36 ` Peter Lieven
2015-10-01 9:52 ` Peter Lieven
2015-10-02 7:36 ` Gerd Hoffmann
2015-10-02 8:03 ` Peter Lieven
2015-10-02 8:17 ` Gerd Hoffmann
2015-10-05 15:14 ` Peter Lieven
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=1443535703.21557.63.camel@redhat.com \
--to=kraxel@redhat.com \
--cc=pl@kamp.de \
--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).