Re: __vmalloc() vs. GFP_NOIO/GFP_NOFS

From: Al Viro
Date: Sun Jan 03 2016 - 11:56:23 EST


On Sun, Jan 03, 2016 at 07:12:47AM +0000, Al Viro wrote:

> Allocation page tables doesn't have gfp argument at all. Trying to propagate
> it down there could be done, but it's not attractive.

While we are at it, is there ever a reason to _not_ pass __GFP_HIGHMEM in
__vmalloc() flags? After all, we explicitly put the pages we'd allocated
into the page table at vmalloc range we'd grabbed and these are the
addresses visible to caller. Is there any point in having another alias
for those pages?

vmalloc() itself passes __GFP_HIGHMEM and so does a lot of __vmalloc()
callers; in fact, most of those that do not look like a result of
"we want vmalloc(), but we want to avoid it going into fs code and possibly
deadlocking us; vmalloc() has no gfp_t argument, so let's use __vmalloc()
and give it GFP_NOFS".

Another very weird thing is the use of GFP_ATOMIC by alloc_large_system_hash();
if we want _that_ honoured, we'd probably have to pass gfp_t to alloc_one_pmd()
and friends, but I'm not sure what exactly is that caller requesting.
Confused...
--
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/