This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PING][PATCHv3 1/2] aarch64: Hoist ZVA check out of the memset function


[I've responded to your point about macros elsewhere in the thread]

On Thursday 12 October 2017 02:50 AM, Wilco Dijkstra wrote:
> Note we also should benchmark this on various other cores to see what
> the impact is. I wrote this memset code for specific reasons - changing that
> could have a big impact on some cores, so we need to show this doesn't
> cause regressions.

Yes, and that's something I'll lean on you to study and fix since I
don't have access to all that hardware :)

That said, the effect of dropping zva checks should be positive on every
core for memset(0).  The alignments might change things a bit but I
think we should fix those as we go along and not wait for that to be
correct since this gain is pretty big to keep away.  This also adds
incentive to document our alignment decisions since they weren't
documented in the earlier code.

> Also we need to decide on how to read the ZVA size. I don't think there is
> any point in supporting that many options (reading it, using a global, using
> an ifunc and not using ZVA at all). The very first memset had a few of these
> options, and I removed them precisely because it created way too many
> permutations to test and benchmark. So if we add ifuncs, then we shouldn't
> need to use a global too. For the dynamic linker we could just use a basic
> memset without any ifuncs (so then it becomes 2 variants, ifunc using ZVA,
> and no ZVA).

Sorry, I just noticed that I had not updated the commit text; I dropped
the static variable after discussion with Szabolcs.  The code now simply
uses the old style memset for non-standard zva sizes since we agreed
that it's not a problem worth solving right now given that no announced
cores have non-standard zva sizes.

Siddhesh


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]