This is the mail archive of the libc-alpha@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: [PATCH] x86: Add --enable-rdtscp-in-benchtests


* 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


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