This is the mail archive of the libc-help@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: Build and test memory functions in glibc-2.25



On 27/03/2017 13:01, Lu, Hongjiu wrote:
> Hi hongjiu and glibc developers,
> 
> I was investigating whether a few memory functions(memcpy, memset, memmove) with various versions(sse4, ssse3, avx2, avx512) in glibc-2.25 could have performance gain for our server programs in Linux(glibc 2.12). I put the detailed question on stackoverflow(http://stackoverflow.com/questions/42999511/port-glibc-2-25-and-test-memory-functions). In short, my questions are as follows:
> 
> 1. I built glibc-2.25 on my dev machine and run my application under newly built glibc. Then did the glibc select the most suitable version of memory functions automatically for me according to the cpu/os/memory?
> 
> That is correct.
> 
> H.J.
> ----
> 2. If #1’s answer is no, do I need to tweak a few options for ./configuration and make to achieve that?

Default configure option for x86_64 is to enable ifunc (or multi-arch in glibc terminology)
as default. So, unless you actually configured glibc with --disable-multi-arch you will
have ifunc enabled.

> 
> 3. If #2 is impossible, I was wondering if I need to dispatch the memcpy/memset/memmove calls to the appropriate version of functions with __attribute__((ifunc))( https://gcc.gnu.org/bugzilla/show_bug.cgi?id=40528 ) manually according to the corresponding boolean test of the cpu(Built-in Function: int __builtin_cpu_supports (const char *feature))? 
> 
> I reviewed changelog and the related links above and put hongjiu on the list explicitly. Please help take a look and I’m looking forward to your replies.
> 
> Thanks in advance.
> 
> ________________________________________
> wentingli(李文亭)
> 


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