ctdb: Adding memory pool for queue callback

Volker Lendecke Volker.Lendecke at SerNet.DE
Wed Nov 7 15:47:34 UTC 2018

On Wed, Nov 07, 2018 at 04:27:19PM +0100, Swen Schillig wrote:
> 	t = clock();
> 	for (i = 0; i < 100000000; i++) {
> 		ts = talloc(pool_ctx, struct test_struct);
> 		talloc_free(ts);
> 	}

I can see this piece. This is just a very simple
talloc()/talloc_free(). The pool can do that extremely efficient.
However, if you add a talloc(ts, struct test_struct) between the first
talloc and the free, things get more complex for the pool. That might
be a major difference to what the testsuite does: It allocates 3
objects from the pool in a hierarchy and free's just the parent.

The question now is: Do ctdb packet handlers talloc children off the

With best regards,

Volker Lendecke

SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de

More information about the samba-technical mailing list