[PATCH] x86, mm: dont use non-temporal stores in pagecache accesses

From: Ingo Molnar
Date: Mon Mar 02 2009 - 05:40:23 EST



* Arjan van de Ven <arjan@xxxxxxxxxxxxx> wrote:

> On Sat, 28 Feb 2009 19:27:59 +0100
> Ingo Molnar <mingo@xxxxxxx> wrote:
>
> >
> > OTOH, given how draconian non-temporal stores are, i'm leaning
> > towards removing them from the x86 code altogether. If it matter
> > to performance somewhere it can be reintroduced, based on really
> > well backed up numbers.
>
> I think that is mostly the right approach; O_DIRECT could be
> the exception to that (because there we don't only wipe it
> from the cpu cache due to DMA, it even gets wiped from the
> pagecache!). But I can see that being too special of a case to
> care about in the grand scheme of things (although the
> database people will now get upset with me ;-)

ok, i've removed most of the non-temporal stores hacks from the
pagecache code on x86 - see the commit below, queued up in
tip:x86/mm. (Other architectures did not make use of the
_nocache() primitives at all.)

The _nocache() primitives are still there and are also still
used by the Intel 3D driver code - passing buffers from the CPU
to the GPU is an arguably correct special-case use of MOVNT.

O_SYNC (or any other thing iozone benchmarks might hit) will
need to try a cleaner approach that does not affect the cached
path. But, i'd not be surprised if it was all fine as-is as well
- O_DIRECT IO wont normally get copied anyway.

Ingo

----------------->