Re: [PATCH 1/7] mm: introduce simple_malloc()/simple_free()

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andrew Morton
Date: Monday, November 17, 2008 - 12:13 am

On Mon, 17 Nov 2008 15:43:59 +0900 "KOSAKI Motohiro" <kosaki.motohiro@jp.fujitsu.com> wrote:


It would only make sense if __vmalloc() can be called in atomic contexts.

__vmalloc() cannot be called from irq contexts due to it taking
non-irq-safe spinlocks.

__vmalloc() kinda looks like it could be called from non-irq atomic
contexts with GFP_ATOMIC, but I think it lies.  For example,
pud_alloc_one/pmd_alloc_one/etc use hard-wired GFP_KERNEL.

In which case this new allocation function can only be called from
contexts where GFP_KERNEL can be used, hence we don't need to pass that
in - it would be misleading to do so.

In fact it's not immediately clear why __vmalloc() takes a gfp_t
argument either?
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/7] mm: introduce simple_malloc()/simple_free(), Lai Jiangshan, (Sat Nov 15, 9:33 pm)
Re: [PATCH 1/7] mm: introduce simple_malloc()/simple_free(), Alexey Dobriyan, (Sat Nov 15, 9:49 pm)
Re: [PATCH 1/7] mm: introduce simple_malloc()/simple_free(), Arjan van de Ven, (Sat Nov 15, 9:52 pm)
Re: [PATCH 1/7] mm: introduce simple_malloc()/simple_free(), Arjan van de Ven, (Sat Nov 15, 10:53 pm)
Re: [PATCH 1/7] mm: introduce simple_malloc()/simple_free(), KOSAKI Motohiro, (Sun Nov 16, 11:42 am)
Re: [PATCH 1/7] mm: introduce simple_malloc()/simple_free(), Arjan van de Ven, (Sun Nov 16, 11:57 am)
Re: [PATCH 1/7] mm: introduce simple_malloc()/simple_free(), Arjan van de Ven, (Sun Nov 16, 2:51 pm)
Re: [PATCH 1/7] mm: introduce simple_malloc()/simple_free(), KAMEZAWA Hiroyuki, (Sun Nov 16, 10:25 pm)
Re: [PATCH 1/7] mm: introduce simple_malloc()/simple_free(), KOSAKI Motohiro, (Sun Nov 16, 11:43 pm)
Re: [PATCH 1/7] mm: introduce simple_malloc()/simple_free(), Andrew Morton, (Mon Nov 17, 12:13 am)
Re: [PATCH 1/7] mm: introduce simple_malloc()/simple_free(), KOSAKI Motohiro, (Mon Nov 17, 1:10 am)