Re: Cache incoherencies

Ralf Baechle (ralf@uni-koblenz.de)
Wed, 25 Aug 1999 02:29:00 +0200


On Tue, Aug 24, 1999 at 11:48:06AM +0100, Philip Blundell wrote:

> >The only way I see to make the fist issue safe is to have the ring
> >descriptor entries non cachable.
>
> Yes. This is the better solution for performance as well. The flushing
> routines are really only suitable for large blocks such as data buffers.

I did experiment with this a long time ago. The result was that flushing
is better for every data object larger than one or two cachelines. The
limit also depends a bit of the size of cachelines and overhead of the
cacheflushing code.

The number is so low because uncached writes to memory will on most
architectures bypass the writebuffer and other optimizations resulting
in some penalty.

> >Non-cache coherent archs should probably
> >define a kmalloc flag to allocate non cachable space. (I still don't know
> >what is the cleanest way to get non-cachable space. ioremap ?).

There isn't a portable way to get uncached memory. But GFP_UNCACHED
sounds good.

> Ioremap won't necessarily work on physical RAM. You should probably define
> vmalloc_uncached or some such.

Ralf

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/