Re: [PATCH 1/11] Add __GFP_MOVABLE flag and update callers

From: Linus Torvalds
Date: Tue Nov 21 2006 - 19:45:08 EST




On Tue, 21 Nov 2006, Mel Gorman wrote:
>
> On Tue, 21 Nov 2006, Christoph Lameter wrote:
>
> > Are GFP_HIGHUSER allocations always movable? It would reduce the size of
> > the patch if this would be added to GFP_HIGHUSER.
> >
>
> No, they aren't. Page tables allocated with HIGHPTE are currently not movable
> for example. A number of drivers (infiniband for example) also use
> __GFP_HIGHMEM that are not movable.

It might make sense to just use another GFP_HIGHxyzzy #define for the
non-movable HIGHMEM users. There's probably much fewer of those, and their
behaviour obviously is very different from the traditional GFP_HIGHUSER
pages (ie page cache and anonymous user mappings).

So you could literally use "GFP_HIGHPTE" for the PTE mappings, and that
would in fact even simplify some of the users (ie it would allow moving
the #ifdef CONFIG_HIGHPTE check from the code to <linux/gfp.h>). Similarly
for any other non-movable things, no?

So then we'd just make GFP_HIGHUSER implicitly mean "movable". It could be
nice if GFP_USER would do the same, but I guess we have too many of those
around to verify (although _most_ of those are probably kmalloc, and
kmalloc would obviously better strip away the __GFP_MOVABLE bit anyway).

Linus
-
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/