[PATCH] Improve talloc performance
abartlet at samba.org
Fri Jul 1 07:45:01 UTC 2016
On Thu, 2016-06-30 at 10:48 -0700, Jeremy Allison wrote:
> On Wed, Jun 29, 2016 at 04:55:23PM -0700, Jeremy Allison wrote:
> > On Fri, Jun 17, 2016 at 05:12:12PM -0700, Jeremy Allison wrote:
> > > On Fri, Jun 17, 2016 at 09:50:27PM +1200, Andrew Bartlett wrote:
> > > > Attached is a patch to improve talloc performance, by calling
> > > > talloc_chunk_from_ptr() less often. I'm impressed by how much
> > > > can be
> > > > gained!
> > > >
> > > > Please carefully review!
> > >
> > > I'm going through this right now, but one thing
> > > that has to be done is to split this into a set of smaller
> > > changesets as the chunks are too large to carefully parse
> > > mentally (at least for me). Too much change per patchset.
> > OK, split this into an 11-patch set, with each change
> > being somewhat clearer and smaller (IMHO of course :-).
> > Your original patchset had one error (missing setting
> > the .name in the replacement for talloc_vasprintf(),
> > and a couple of places where you added code, then removed
> > it again.
> > I'm still running tests on it at the moment, but at
> > least it compiles :-).
> > I'll post for your review once I've gotten it past
> > testing !
> OK, here it is. Passes testing and valgrind. Keeps
> the performance boost.
> The first patch renames internal functions that
> take a 'struct talloc_chunk *' from talloc_XXX()
> to tc_XXX(). Subsequent patches keep that naming
> scheme. Doing this I find it much easier to tell
> the functions that take a talloc_chunk apart from
> the ones that take the void * talloc pointer. Has
> no external effect on the ABI of course.
> The rest of them are your patch split into easily
> digestible changes.
> Next time, try and do this yourself to save me a
> lot of work (although I'd have to understand all
> the changes anyway of course :-). Small micro-patches
> the do only one thing really make this work easier.
I totally agree.
I really appreciate your patience to split up the patches so finely and
to work over the details carefully.
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
Samba Developer, Catalyst IT http://catalyst.net.nz/services/samba
More information about the samba-technical