This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
RE: Build and test memory functions in glibc-2.25
- From: "Lu, Hongjiu" <hongjiu dot lu at intel dot com>
- To: "wentingli at tencent dot com" <wentingli at tencent dot com>, "libc-help at sourceware dot org" <libc-help at sourceware dot org>
- Cc: "hjl dot tools at gmail dot com" <hjl dot tools at gmail dot com>
- Date: Mon, 27 Mar 2017 16:01:03 +0000
- Subject: RE: Build and test memory functions in glibc-2.25
- Authentication-results: sourceware.org; auth=none
- References: <A5E93B907A3D7B45A6901D155C285E921276A2E5@EXMBX-TJ003.tencent.com>
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?
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(李文亭)