From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jiri Slaby Subject: Re: [PATCH v2] fs: use kmalloc() to allocate fdmem if possible Date: Wed, 05 May 2010 09:18:40 +0200 Message-ID: <4BE11BD0.8040703@suse.cz> References: <1272826920-8899-1-git-send-email-xiaosuo@gmail.com> <20100504152713.0c72a087.akpm@linux-foundation.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Changli Gao , Alexander Viro , "Paul E. McKenney" , Alexey Dobriyan , Ingo Molnar , Peter Zijlstra , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Avi Kivity , Tetsuo Handa , eric.dumazet@gmail.com To: Andrew Morton Return-path: In-Reply-To: <20100504152713.0c72a087.akpm@linux-foundation.org> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On 05/05/2010 12:27 AM, Andrew Morton wrote: > On Mon, 3 May 2010 03:02:00 +0800 > Changli Gao 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