Re: [patch 0/2] sLeAZY FPU feature

From: Chuck Ebbert
Date: Sat Jul 01 2006 - 21:03:07 EST


In-Reply-To: <1151782942.3195.56.camel@xxxxxxxxxxxxxxxxxxxxx>

On Sat, 01 Jul 2006 21:42:22 +0200, Arjan van de Ven wrote:

> > What sort of test?
>
> the one I did was long running FPU app (calculating PI using FPU)

Mine was just running a program that loops doing getpid() in one window
and this in another:

#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>

#define rdtscll(t) asm("rdtsc" : "=A" (t))

int main(int argc, char * const argv[])
{
long long tsc1, tsc2;
long double ld = 0.0;
int i, iters = 999999999;

rdtscll(tsc1);
for (i = 0; i < iters; i++)
ld += 1.0;
rdtscll(tsc2);

printf("count: %Lf, clocks: %llu\n", ld, tsc2 - tsc1);

return 0;
}

So the ~0.4% gain I saw (averaging 10 tests) was likely the minimum
and Arjan's 8.5% gain when switching tasks after every FPU operation
is the max.

--
Chuck
"You can't read a newspaper if you can't read." --George W. Bush
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/