Support dl-tunables.list in subdirectories

Message ID 20170524194109.GA23029@lucon.org
State New, archived
Headers

Commit Message

Lu, Hongjiu May 24, 2017, 7:41 p.m. UTC
  We can put processor specific tunables in dl-tunables.list under
sysdeps instead of in elf/dl-tunables.list.

Any comments?

H.J.
---
	* Makeconfig ($(common-objpfx)dl-tunable-list.h): Also check
	dl-tunables.list in subdirectories.
---
 Makeconfig | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
  

Comments

Siddhesh Poyarekar May 25, 2017, 6:06 a.m. UTC | #1
On Thursday 25 May 2017 01:11 AM, H.J. Lu wrote:
> We can put processor specific tunables in dl-tunables.list under
> sysdeps instead of in elf/dl-tunables.list.
> 
> Any comments?

That makes sense.  However, please avoid putting processor/arch
information in the tunable names.  That is, instead of glibc.x86_tune or
something like that, stick to glibc.tune[1].  That way if the tunable is
deemed to be applicable to other architectures in future, then we can
simply move it to the generic list.

Siddhesh

[1] Any processor/hardware feature tuning should go into the glibc.tune
namespace. I see you're looking to implement IFUNC overrides, so the
tunable I've proposed for that is glibc.tune.mcpu where the values
should map to those in gcc.
  
H.J. Lu May 25, 2017, 12:35 p.m. UTC | #2
On Wed, May 24, 2017 at 11:06 PM, Siddhesh Poyarekar
<siddhesh@gotplt.org> wrote:
> On Thursday 25 May 2017 01:11 AM, H.J. Lu wrote:
>> We can put processor specific tunables in dl-tunables.list under
>> sysdeps instead of in elf/dl-tunables.list.
>>
>> Any comments?
>
> That makes sense.  However, please avoid putting processor/arch

I will check in my patch.

> information in the tunable names.  That is, instead of glibc.x86_tune or
> something like that, stick to glibc.tune[1].  That way if the tunable is
> deemed to be applicable to other architectures in future, then we can
> simply move it to the generic list.

Sure, we can discuss when I submit my patch.

Thanks.

> Siddhesh
>
> [1] Any processor/hardware feature tuning should go into the glibc.tune
> namespace. I see you're looking to implement IFUNC overrides, so the
> tunable I've proposed for that is glibc.tune.mcpu where the values
> should map to those in gcc.
  

Patch

diff --git a/Makeconfig b/Makeconfig
index b494b82..e4eda4b 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -1127,7 +1127,9 @@  ifneq (no,$(have-tunables))
 before-compile += $(common-objpfx)dl-tunable-list.h
 
 $(common-objpfx)dl-tunable-list.h: $(..)scripts/gen-tunables.awk \
-				   $(..)elf/dl-tunables.list
+				   $(..)elf/dl-tunables.list \
+				   $(wildcard $(subdirs:%=$(..)%/dl-tunables.list)) \
+				   $(wildcard $(sysdirs:%=%/dl-tunables.list))
 	$(AWK) -f $^ > $@.tmp
 	mv $@.tmp $@
 endif