Re: [PATCH 0/12] Pass MAP_FIXED down to get_unmapped_area

From: Wu, Bryan
Date: Wed Apr 11 2007 - 22:56:10 EST


On Thu, 2007-04-12 at 12:20 +1000, Benjamin Herrenschmidt wrote:
> This is a "first step" as there are still cleanups to be done in various
> areas touched by that code but I think it's probably good to go as is and
> at least enables me to implement what I need for PowerPC.
>
> (Andrew, this is also candidate for 2.6.22 since I haven't had any real
> objection, mostly suggestion for improving further, which I'll try to
> do later, and I have further powerpc patches that rely on this).
>
> The current get_unmapped_area code calls the f_ops->get_unmapped_area or
> the arch one (via the mm) only when MAP_FIXED is not passed. That makes
> it impossible for archs to impose proper constraints on regions of the
> virtual address space. To work around that, get_unmapped_area() then
> calls some hugetlbfs specific hacks.
>
> This cause several problems, among others:
>
> - It makes it impossible for a driver or filesystem to do the same thing
> that hugetlbfs does (for example, to allow a driver to use larger page
> sizes to map external hardware) if that requires applying a constraint
> on the addresses (constraining that mapping in certain regions and other
> mappings out of those regions).
>
> - Some archs like arm, mips, sparc, sparc64, sh and sh64 already want
> MAP_FIXED to be passed down in order to deal with aliasing issues.
> The code is there to handle it... but is never called.
>

Is there any support consideration for nommu arch such as blackfin which
is in the -mm tree now?

It is very kind of you to point out some idea about MAP_FIXED for
Blackfin arch, I will do some help for this.

Thanks
-Bryan
-
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/