[PATCH] talloc_free_for_exit() and targeted write protection for talloc destructor

Andrew Bartlett abartlet at samba.org
Mon Nov 28 22:35:56 UTC 2016


On Mon, 2016-11-28 at 11:39 -0800, Jeremy Allison wrote:
> On Tue, Nov 29, 2016 at 07:13:53AM +1300, Andrew Bartlett wrote:
> > In a hope of getting more attention and being more transparent,
> > here is
> > the talloc changes I included in my previous patch set.
> > 
> > As background, I want to make our LDAP server multi-process, and
> > running a connect()/bind()/close() loop against the LDAP server
> > showed
> > a significant cost in talloc_free(ev) and talloc_autofree() just
> > before
> > exit.
> 
> I'll try and get to this as soon as I'm caught up on email :-).
> 
> I'd love to see use of talloc_autofree() and the NULL context
> removed from Samba. I know we need to keep them around for ABI
> purposes, but they make threading much things much more difficult.

I totally agree.  Ideally there would be no non-memory destructor
(messaging database records was what made me assume we needed the
destructor) and so we can just call exit(). 

> Just a random 2 cents. I'll get to the patch soon, honest :-).

Thanks :-)

Also note that I've not yet shown the performance impact. 

Andrew Bartlett

-- 
Andrew Bartlett
https://samba.org/~abartlet/
Authentication Developer, Samba Team         https://samba.org
Samba Development and Support, Catalyst IT   
https://catalyst.net.nz/services/samba







More information about the samba-technical mailing list