Re: [CFT][PATCH] 2.5.47 Athlon/Druon, much faster copy_user function

Akira Tsukamoto (at541@columbia.edu)
Sat, 16 Nov 2002 13:50:17 -0500


Hi,

On Sat, 16 Nov 2002 19:30:03 +0100
Andi Kleen <ak@suse.de> mentioned:
>
> The proper way to save it is to use kernel_fpu_begin()

Thanks! I will look into it. This is what I was looking for.

I been running this kernel with my copy for three days, and never had
oops, but I was really worried.

> > > Also I'm pretty sure that using movntq (= forcing destination out of
> > > cache) is not a good strategy for generic copy_from_user(). It may
> > > be a win for the copies in write ( user space -> page cache ),
> >
> > Yes, that why I included postfetch in the code because movntq does not leave
> > them in the L2 cache.
>
> That looks rather wasteful - first force it out and then trying to get it in
> again. I have my doubts on it being a good strategy for speed.

It tried both, use just normal mov or movq <-> use movntq + postfetch, and the later
was much much faster, because postfetch needs to read only every 64 bytes.

I will ckeck kernel_fpu_begin() fisrt and if using fpu register is too much
overhead than I will remove them.

Akira

-
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/