[PATCH] Cache messaging dgm connections

Jeremy Allison jra at samba.org
Mon Sep 12 22:17:28 UTC 2016


On Mon, Sep 12, 2016 at 01:41:26PM -0700, Jeremy Allison wrote:
> On Sun, Sep 11, 2016 at 04:07:15PM +0200, Ralph Böhme wrote:
> > Hi!
> > 
> > Attached is a performance improvement for our dgram messaging.
> > 
> > In most cases, the current code opens a new connection to peers for
> > every message and closes it when done. This patchset adds caching of
> > connections to peers.
> > 
> > Please review & push if ok.
> 
> Reviewing this now - should be done by end of day.

OK - done - pushing with 2 (cosmetic) changes:

1).

 +/* Keep a list of imessaging contexts */
 +struct imessaging_context *msg_ctxs;

should be:

 +/* Keep a list of imessaging contexts */
 +static struct imessaging_context *msg_ctxs;

2). Rename SENDQ_CACHE_TIME -> SENDQ_CACHE_TIME_SECS
so the units are explicit (no unknown units please :-).

*Amazing* work Ralph - really impressive. Took me a while
to follow the logic but really nice !

Cheers,

	Jeremy.



More information about the samba-technical mailing list