[PATCH] x86: Add --enable-rdtscp-in-benchtests

Florian Weimer fweimer@redhat.com
Tue Oct 23 09:14:00 GMT 2018


* 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



More information about the Libc-alpha mailing list