All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joel Becker <Joel.Becker@oracle.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] GFS2: Use kmalloc when possible for ->readdir() (try #2)
Date: Thu, 29 Jul 2010 10:58:29 -0700	[thread overview]
Message-ID: <20100729175829.GD25490@mail.oracle.com> (raw)
In-Reply-To: <20100728101327.88dbd7ac.akpm@linux-foundation.org>

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 at oracle.com
Phone: (650) 506-8127



      parent reply	other threads:[~2010-07-29 17:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-28 11:15 [Cluster-devel] GFS2: Use kmalloc when possible for ->readdir() Steven Whitehouse
2010-07-28 15:39 ` Linus Torvalds
2010-07-28 16:52   ` Steven Whitehouse
2010-07-28 16:56   ` [Cluster-devel] GFS2: Use kmalloc when possible for ->readdir() (try #2) Steven Whitehouse
2010-07-28 17:13     ` Andrew Morton
2010-07-28 17:51       ` Steven Whitehouse
2010-07-29 17:58       ` Joel Becker [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100729175829.GD25490@mail.oracle.com \
    --to=joel.becker@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.