Re: [PATCH] powerpc/mm: setting mmaped page cache property through device tree

2009-12-03 Thread Benjamin Herrenschmidt
On Tue, 2009-12-01 at 15:35 +0100, Segher Boessenkool wrote: > So make the memory known to the kernel, just tell the kernel not to > use it. If it's normal system RAM, just put it in the "memory" node > and do a memreserve on it (or do something in your platform code); if > it's some other memory,

Re: [PATCH] powerpc/mm: setting mmaped page cache property through device tree

2009-12-03 Thread Benjamin Herrenschmidt
On Tue, 2009-12-01 at 19:34 +0800, Li Yang wrote: > The scenario for the second case is to pre-allocate some memory to a > certain application or device (probably through mem=XXX kernel > parameter or limit through device tree). The memory is not known to > kernel, but fully managed by the applica

Re: [PATCH] powerpc/mm: setting mmaped page cache property through device tree

2009-12-02 Thread Li Yang
On Thu, Dec 3, 2009 at 12:15 PM, Segher Boessenkool wrote: The scenario for the first case is that in a multicore system running ASMP which means different OS runs on different cores.  They might communicate through a shared memory region.  The region on every OS need to be map

Re: [PATCH] powerpc/mm: setting mmaped page cache property through device tree

2009-12-02 Thread Segher Boessenkool
The scenario for the first case is that in a multicore system running ASMP which means different OS runs on different cores. They might communicate through a shared memory region. The region on every OS need to be mapped with the same cache perperty to avoid cache paradox. This isn't true.

Re: [PATCH] powerpc/mm: setting mmaped page cache property through device tree

2009-12-01 Thread Li Yang
On Tue, Dec 1, 2009 at 10:35 PM, Segher Boessenkool wrote: >> The scenario for the first case is that in a multicore system running >> ASMP which means different OS runs on different cores.  They might >> communicate through a shared memory region.  The region on every OS >> need to be mapped with

Re: [PATCH] powerpc/mm: setting mmaped page cache property through device tree

2009-12-01 Thread Segher Boessenkool
The scenario for the first case is that in a multicore system running ASMP which means different OS runs on different cores. They might communicate through a shared memory region. The region on every OS need to be mapped with the same cache perperty to avoid cache paradox. This isn't true. In

Re: [PATCH] powerpc/mm: setting mmaped page cache property through device tree

2009-12-01 Thread Li Yang
On Tue, Dec 1, 2009 at 6:58 PM, Benjamin Herrenschmidt wrote: > On Tue, 2009-12-01 at 18:30 +0800, Li Yang wrote: >> The patch adds the ability for powerpc architecture to set page cache >> property of mmaped area through device tree.  This is useful for two >> cases.  First, for memory shared wit

Re: [PATCH] powerpc/mm: setting mmaped page cache property through device tree

2009-12-01 Thread Benjamin Herrenschmidt
On Tue, 2009-12-01 at 18:30 +0800, Li Yang wrote: > The patch adds the ability for powerpc architecture to set page cache > property of mmaped area through device tree. This is useful for two > cases. First, for memory shared with other OS'es to have the same cache > property to avoid cache parad

[PATCH] powerpc/mm: setting mmaped page cache property through device tree

2009-12-01 Thread Li Yang
The patch adds the ability for powerpc architecture to set page cache property of mmaped area through device tree. This is useful for two cases. First, for memory shared with other OS'es to have the same cache property to avoid cache paradoxes. Second, enabling application to map memory which is