This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gomp3] libgomp performance improvements
- From: Andi Kleen <andi at firstfloor dot org>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Diego Novillo <dnovillo at google dot com>
- Date: 16 Mar 2008 13:16:17 +0100
- Subject: Re: [gomp3] libgomp performance improvements
- References: <20080315083325.GB29754@devserv.devel.redhat.com>
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