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

From: Benjamin Herrenschmidt
Date: Thu Dec 03 2009 - 21:38:06 EST


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 application/device. We need being
> able to map the region cachable for better performance.
>
> > trying to achieve here ? We can find a solution though it might
> involve
> > a specific driver to handle that memory.
>
> Right, but what the user to kernel API should be used? Is it ok to
> use the O_SYNC flag as I previously proposed?

If it's cachable, why don't you write yourself a little driver that
allocates memory maps it to userspace and provides you with the physical
addresses and problem solved ?

Cheers,
Ben.

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