This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] aarch64: Add tunable glibc.memset.dc_zva_threshold
- From: Siddhesh Poyarekar <siddhesh at gotplt dot org>
- To: Wilco Dijkstra <Wilco dot Dijkstra at arm dot com>, 'GNU C Library' <libc-alpha at sourceware dot org>, "fxue at os dot amperecomputing dot com" <fxue at os dot amperecomputing dot com>
- Cc: nd <nd at arm dot com>
- Date: Wed, 7 Aug 2019 19:42:48 +0530
- Subject: Re: [PATCH] aarch64: Add tunable glibc.memset.dc_zva_threshold
- References: <VI1PR0801MB21270BD012CBA889798C1CB483D50@VI1PR0801MB2127.eurprd08.prod.outlook.com>
On 06/08/19 9:47 PM, Wilco Dijkstra wrote:
> Hi Feng,
>
>> I still hope this tuning on dc zva can work for other aarch64 processors.
>> Since we focus on emag, and got no other aarch64 machines on hand,
>> Then, if someone of other aarch64 is willing to test this, that would be better.
>
> I don't believe this kind of tunable is useful in general. DC ZVA exists because
> it gives a speedup - quite significantly so on the latest microarchitectures, but it
> improves gcc_r performance as well on older cores like Cortex-A57.
>
> If you find that it doesn't help emag, the best option is to avoid DC ZVA
> altogether - this is even faster as you don't have to execute the runtime check.
> Or you could use a tunable to select between fixed settings of the DC ZVA.
>
> In fact it might be useful to have a generic tunable which allows one to choose
> specific ifuncs, eg. glibc.memset=__memset_no_dczva.
This is an interesting idea. Although just for this specific case, it
might be sufficient to implement the glibc.cpu.hwcaps tunable from x86
and have "dczva" as a capability that can be turned on or off with + or -.
But your first suggestion is probably the easiest; drop dc zva
completely for ampere.
Siddhesh