FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Cluster Development

 
 
LinkBack Thread Tools
 
Old 07-29-2010, 05:58 PM
Joel Becker
 
Default GFS2: Use kmalloc when possible for ->readdir() (try #2)

On Wed, Jul 28, 2010 at 10:13:27AM -0700, Andrew Morton wrote:
> On Wed, 28 Jul 2010 17:56:23 +0100 Steven Whitehouse <swhiteho@redhat.com> wrote:
> > +static void gfs2_free_sort_buffer(void *ptr)
> > +{
> > + if (is_vmalloc_addr(ptr))
> > + vfree(ptr);
> > + else
> > + kfree(ptr);
> > +}
>
> This got kicked around a bit in May (Subject: mm: generic adaptive
> large memory allocation APIs). That patch tried kmalloc(), then
> alloc_pages(), then vmalloc(). Nothing got merged though.
>
> I wasn't terribly excited about it because of vague fears that it would
> just incite people to spend even less effort thinking about how large
> their individual allocations are.

I think these sort of things belong closer to the using code.
Like gfs2's declaration that "this is how we do our sort buffers," it is
a decision best left to the caller.

Joel

--

"If you are ever in doubt as to whether or not to kiss a pretty girl,
give her the benefit of the doubt"
-Thomas Carlyle

Joel Becker
Consulting Software Developer
Oracle
E-mail: joel.becker@oracle.com
Phone: (650) 506-8127
 

Thread Tools




All times are GMT. The time now is 09:29 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org