This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: [gomp3] libgomp performance improvements


Jakub Jelinek <jakub@redhat.com> writes:
> 
> loop to be able to translate milliseconds into gomp_spin_count_var;
> probably using a short benchmark on libgomp startup, but don't want
> to make it too expensive - on some targets which don't have rep;nop
> or hint @pause perhaps just reading /proc/cpuinfo to find MHz and
> use hardcoded number of ticks would work too - any suggestions appreciated),

Relying on /proc/cpuinfo is not a good idea on CPUs with varying RDTSC
tick (like most AMD CPUs before Fam10). because you cannot keep up
with the frequency changes.

To do it properly on these CPU would require kernel support with a vsyscall.

Failing that just hard coding something is likely better.

-Andi


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