Re: [BK+PATCH] remove __constant_memcpy

From: Linus Torvalds (torvalds@transmeta.com)
Date: Thu Apr 17 2003 - 18:59:55 EST


On Thu, 17 Apr 2003, Jeff Garzik wrote:
>
> If DTRT means just using the existing code for large copies in general,
> that's easy enough... patch attached.

Yeah, this looks more palatable. It gets rid of a rather ugly thing, with
no loss in generality _and_ if gcc ever tries to use sse2 for small
copies, we can file that as a valid bug (there's just no way it's a good
idea considering the costs of FP state even in user space)

> 1) where did the 486 string ops go?

They were disabled forever, because nobody cared enough, and they had
known (or at least strongly suspected) bugs.

> 2) why no sse2-optimized memcpy? just that noone has done one yet?

Yes. If you want to, it's definitely the right thing to do. More so than
the 3dnow stuff that is by now ancient. HOWEVER, I don't think there are
any really valid large memcpy() calls inside the kernel. All the valid
ones are either special-cased (ie "copy_page()") or to user space.

So I wouldn't worry about it at a memcpy() level.

                Linus

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



This archive was generated by hypermail 2b29 : Wed Apr 23 2003 - 22:00:23 EST