Thread (20 messages) 20 messages, 6 authors, 2012-05-01

Re: [RFC] propagate gfp_t to page table alloc functions

From: Nick Piggin <npiggin@gmail.com>
Date: 2012-05-01 07:20:54
Also in: lkml

On 25 April 2012 07:30, Andrew Morton [off-list ref] wrote:
On Tue, 24 Apr 2012 17:48:29 +1000
Nick Piggin [off-list ref] wrote:
quoted
quoted
Hmm, there are several places to use GFP_NOIO and GFP_NOFS even, GFP_ATOMIC.
I believe it's not trivial now.
They're all buggy then. Unfortunately not through any real fault of their own.
There are gruesome problems in block/blk-throttle.c (thread "mempool,
percpu, blkcg: fix percpu stat allocation and remove stats_lock").  It
wants to do an alloc_percpu()->vmalloc() from the IO submission path,
under GFP_NOIO.
Yeah, that sucks. CFQ has something similar.

Should just allocate it up front when creating a throttled group.
Allocate and init when it first gets used schemes are usually pretty
problematic. Is it *really* warranted to do it lazily like this?
Changing vmalloc() to take a gfp_t does make lots of sense, although I
worry a bit about making vmalloc() easier to use!

I do wonder whether the whole scheme of explicitly passing a gfp_t was
a mistake and that the allocation context should be part of the task
context.  ie: pass the allocation mode via *current.  As a handy
side-effect that would probably save quite some code where functions
are receiving a gfp_t arg then simply passing it on to the next
callee.
Both paragraphs make a lot of sense. Conceptually. :)

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help