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

From: KAMEZAWA Hiroyuki
Date: Tue Apr 24 2012 - 20:07:09 EST


(2012/04/25 8:55), KOSAKI Motohiro wrote:

> On Tue, Apr 24, 2012 at 7:49 PM, KAMEZAWA Hiroyuki
> <kamezawa.hiroyu@xxxxxxxxxxxxxx> wrote:
>> (2012/04/25 6:30), Andrew Morton wrote:
>>
>>> On Tue, 24 Apr 2012 17:48:29 +1000
>>> Nick Piggin <npiggin@xxxxxxxxx> wrote:
>>>
>>>>> 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.
>>>
>>> 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.
>>
>> yes...that's very interesting.
>
> I think GFP_ATOMIC is used non task context too. ;-)

Hmm, in interrupt context or some ? Can't we detect it ?

Thanks,
-Kame





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