[PATCH] notifyd: fix memory alignment

Volker Lendecke Volker.Lendecke at SerNet.DE
Sun Jul 19 08:38:59 UTC 2015


On Sat, Jul 18, 2015 at 08:30:46PM -0700, Jeremy Allison wrote:
> On Sat, Jul 18, 2015 at 09:52:28PM +0200, Volker Lendecke wrote:
> > On Fri, Jul 17, 2015 at 11:12:46AM -0700, Jeremy Allison wrote:
> > > On Thu, Jul 16, 2015 at 09:47:53PM +0300, Uri Simchoni wrote:
> > > > Best thing is to set up the DB fetching in a way that the data is
> > > > aligned when fetched (the parse function can verify this). I'll look
> > > > into it but xtdb experts can look into it without the learning curve.
> > > > Second best option is to have an array that grows as-needed. This
> > > > removes the allocations but not the copying.
> > > 
> > > Yeah, we can't avoid the memcpy I think (if you can
> > > think of a way I'm very interested).
> > 
> > What about the attached patch? Survives an initial small
> > test for me.
> 
> Oh you fixed it in the dbwrap layer. That's cheating :-).

Right. The problem is that this might be different behaviour
between dbwrap_rbt and for example dbwrap_tdb. rbt will give
us 16-byte aligned data in the callbacks, tdb might not. We
might have to do similar things in other backends too.

Uri, does the patch solve your problem?

Volker

-- 
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