[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] rpc: message related sizes enlarged



On 04/22/2013 04:34 PM, Daniel P. Berrange wrote:
On Mon, Apr 22, 2013 at 04:22:26PM +0200, Viktor Mihajlovski wrote:
I'm not against this in general, but before we enlarge this so much
there needs to be some code work to make RPC message encoding more
efficient. Currently virNetMessageEncodeHeader will allocate
VIR_NET_MESSAGE_MAX immediately, regardless of whether the message
being encoded acutally needs so much. The problem is that we can't
tell ahead of time how much space a message needs. We just can't go
on doing this if we're going to have such large max message size.
We need to start with small allocs & grow if we hit the size limit.
So something along the lines of allocating VIR_NET_MESSAGE_INITIAL bytes, maybe well below 1M, and then bumping it in the
EncodePayloadxxx calls if required. Do you foresee any pitfalls
one should consider?

Daniel


--

Mit freundlichen Grüßen/Kind Regards
   Viktor Mihajlovski

IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Martina Köderitz
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]