This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] x86: Add --enable-rdtscp-in-benchtests
- From: Florian Weimer <fweimer at redhat dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Tue, 23 Oct 2018 11:04:13 +0200
- Subject: Re: [PATCH] x86: Add --enable-rdtscp-in-benchtests
- References: <20181022223711.26910-1-hjl.tools@gmail.com>
* H. J. Lu:
> RDTSCP waits until all previous instructions have executed and all
> previous loads are globally visible before reading the counter. RDTSC
> doesn't wait until all previous instructions have been executed before
> reading the counter. This patch adds --enable-rdtscp-in-benchtests to
> use RDTSCP in benchtests.
>
> NOTE: Benchtests in RDTSCP-enabled glibc require CPUs capable of RDTSCP
> instruction. All x86 processors since 2010 support RDTSCP instruction.
Shouldn't the benchtests use clock_gettime anyway, to avoid issues in
case the TSC is not synchronized across cores?
Thanks,
Florian