Re: [RFC/PATCH 1/2] powerpc: Rework usage of _PAGE_COHERENT/NO_CACHE/GUARDED

2008-12-10 Thread Benjamin Herrenschmidt
> In the code that does the mapping. It's a lot cheaper to figure out if > _PAGE_COHERENT is needed once per mapping instead of per page per fault. What do you mean by "code that does the mapping" ? The OR'ing or AND'ing out of one bit is pretty cheap regardless, so "a lot cheaper" is very rela

Re: [RFC/PATCH 1/2] powerpc: Rework usage of _PAGE_COHERENT/NO_CACHE/GUARDED

2008-12-10 Thread Trent Piepho
On Thu, 11 Dec 2008, Benjamin Herrenschmidt wrote: > On Wed, 2008-12-10 at 11:33 -0800, Trent Piepho wrote: >> On Wed, 10 Dec 2008, Benjamin Herrenschmidt wrote: >>> This changes the logic so that instead, the PTE now contains >>> _PAGE_COHERENT for all normal RAM pages tha have I = 0. The hash >>>

Re: [RFC/PATCH 1/2] powerpc: Rework usage of _PAGE_COHERENT/NO_CACHE/GUARDED

2008-12-10 Thread Benjamin Herrenschmidt
On Wed, 2008-12-10 at 11:33 -0800, Trent Piepho wrote: > On Wed, 10 Dec 2008, Benjamin Herrenschmidt wrote: > > This changes the logic so that instead, the PTE now contains > > _PAGE_COHERENT for all normal RAM pages tha have I = 0. The hash > > code clears it if the feature bit is not set. > > Wh

Re: [RFC/PATCH 1/2] powerpc: Rework usage of _PAGE_COHERENT/NO_CACHE/GUARDED

2008-12-10 Thread Trent Piepho
On Wed, 10 Dec 2008, Benjamin Herrenschmidt wrote: > This changes the logic so that instead, the PTE now contains > _PAGE_COHERENT for all normal RAM pages tha have I = 0. The hash > code clears it if the feature bit is not set. Why not check the feature bit when the PTE is made and unset _PAGE_CO

[RFC/PATCH 1/2] powerpc: Rework usage of _PAGE_COHERENT/NO_CACHE/GUARDED

2008-12-09 Thread Benjamin Herrenschmidt
Currently, we never set _PAGE_COHERENT in the PTEs, we just OR it in in the hash code based on some CPU feature bit. We also manipulate _PAGE_NO_CACHE and _PAGE_GUARDED by hand in all sorts of places. This changes the logic so that instead, the PTE now contains _PAGE_COHERENT for all normal RAM pa