Re: K7/Athlon optimizations and Sacrifices to the Great Ones.
Alan Cox (alan@lxorguk.ukuu.org.uk)
Fri, 7 Sep 2001 21:52:27 +0100 (BST)
> I did some trial and error modifications to mmx.c and found out
> that this one makes my athlons happy (but must admin i have
> no clue why). it seems to run stable now.
> 
> --- linux-2.4.9/arch/i386/lib/mmx.c	Tue May 22 19:23:16 2001
> +++ linux-2.4.9-ac6-hack/arch/i386/lib/mmx.c	Sat Sep  8 00:51:33 2001
> @@ -194,6 +194,9 @@
>  		: : "r" (from), "r" (to) : "memory");
>  		from+=64;
>  		to+=64;
> +	__asm__ __volatile__ (
> +		"  sfence \n" : :
> +	);
>  	}
>  	for(i=(4096-320)/64; i<4096/64; i++)
>  	{
> 
You are effectively continually stalling the processor so that the fast
streaming memory transfers dont occur. Instead you start, block, start,
block, ...
Alan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/