Andrew Morton <akpm@digeo.com> writes:
> (That is, using the movnta instructions for well-aligned copies
> and clears so that we don't read the destination memory while overwriting
> it).
I did some experiments with movnta and it was near always a loss for
memcpy/copy_*_user type stuff. The reason is that it flushes the destination
out of cache and when you try to read it afterwards for some reason
(which happens often - e.g. most copy_*_user uses actually do access it
afterwards) then you eat a full cache miss for them and that is costly
and kills all other advantages.
It may be a win for direct copy-to-page cache and then page cache DMA
outside and page cache not mapped anywhere, but even then it's not completely
clear it's that helpful to have it not in cache. For example an Athlon
can serve an DMA directly out of its CPU caches and that may be
faster than serving it out of RAM (Intel CPUs cannot however)
-Andi
-
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 : Thu Nov 07 2002 - 22:00:24 EST