Re: [PATCH] fs: use kmalloc() to allocate fdmem if possible

From: Changli Gao
Date: Mon May 03 2010 - 03:06:27 EST


On Mon, May 3, 2010 at 2:06 PM, Avi Kivity <avi@xxxxxxxxxx> wrote:
>
> My point is, vmalloc() and vfree should do this, not their callers:
>
> vmalloc(size):
> Â Âif (size <= PAGE_SIZE)
> Â Â Â Âreturn kmalloc(size, GFP_KERNEL);
> Â Â...
>
> vfree(p):
> Â Âif (!is_vmalloc_addr(p) {
> Â Â Â Âkfree(p);
> Â Â Â Âreturn;
> Â Â}
> Â Â...

I think we should not change vmalloc/vfree, and you can invent new
memory APIs, such as malloc()/free().

--
Regardsï
Changli Gao(xiaosuo@xxxxxxxxx)
--
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/