Re: x86 memcpy performance
From: Borislav Petkov
Date: Mon Aug 15 2011 - 16:05:23 EST
On Mon, Aug 15, 2011 at 03:11:40PM -0400, Andrew Lutomirski wrote:
> > Well, copy_from_user... does a bunch of rep; movsq - if the SSE version
> > shows reasonable speedup there, we might need to make those work too.
>
> I'm a little surprised that SSE beats fast string operations, but I
> guess benchmarking always wins.
If by fast string operations you mean X86_FEATURE_ERMS, then that's
Intel-only and that actually would need to be benchmarked separately.
Currently, I see speedup for large(r) buffers only vs rep; movsq. But I
dunno about rep; movsb's enhanced rep string tricks Intel does.
> Yes. But we don't nest that much, and the save/restore isn't all that
> expensive. And we don't have to save/restore unless kernel entries
> nest and both entries try to use kernel_fpu_begin at the same time.
Yep.
> This whole project may take awhile. The code in there is a
> poorly-documented mess, even after Hans' cleanups. (It's a lot worse
> without them, though.)
Oh yeah, this code could use lotsa scrubbing :)
--
Regards/Gruss,
Boris.
--
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/