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

From: Jiri Slaby
Date: Wed May 05 2010 - 03:18:59 EST


On 05/05/2010 12:27 AM, Andrew Morton wrote:
> On Mon, 3 May 2010 03:02:00 +0800
> Changli Gao <xiaosuo@xxxxxxxxx> wrote:
>
>> use kmalloc() to allocate fdmem if possible.
>>
>> vmalloc() is used as a fallback solution for fdmem allocation. A new helper
>> function __free_fdtable() is introduced to reduce the lines of code.
>>
>> A potential bug, vfree() a memory allocated by kmalloc(), is fixed.
>>
>
> Seems a reasonable thing to do.

Hi,

So didn't we converge to something like this:
http://lkml.org/lkml/2010/5/3/53
instead of this patch?

This

> It might also be reasonable to make
> vmalloc() try kmalloc() first, but that's a separate exercise.

and this

> This most definitely should have __GFP_NOWARN.

is discussed there too btw.

thanks,
--
js
suse labs
--
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/