ctdb: Adding memory pool for queue callback
martin at meltin.net
Tue Oct 9 04:01:43 UTC 2018
On Mon, 01 Oct 2018 12:55:12 +0200, Swen Schillig <swen at vnet.ibm.com>
> On Fri, 2018-09-28 at 15:48 +1000, Martin Schwenke wrote:
> > This is generally a good improvement.
> > I think the following part of the commit message probably needs to be
> > updated:
> > All received messages are processed synchronously per queue,
> > therefore, a larger memory pool is not requried.
> > There are definitely packets that are processed asynchronously. Any
> > of
> > the control handling functions called by ctdb_control_dispatch() that
> > have async_reply passed to them can talloc_steal() the control
> > structure
> > (i.e. the packet, because structs on the wire!). Similarly for
> > things
> > like ctdb_reply_call().
> > However, even with some packets processed asynchronously I think that
> > this should provide a useful reduction in malloc()s.
> > Can you please take a look at these code paths and, if convinced,
> > update the commit message?
> Patch description updated.
I'd prefer to see the commit message mention that the pool doesn't
cover all cases due to some cases being handled asynchronously.
However, the patch itself will provide a significant reduction in the
number of malloc()s, so:
Reviewed-by: Martin Schwenke <martin at meltin.net>
Another team reviewer please?
This one depends on a previous patch, which is still awaiting a 2nd
My RB+ for this is here:
peace & happiness,
More information about the samba-technical