From: Pekka Enberg <penberg@cs.helsinki.fi>
To: Christoph Lameter <clameter@sgi.com>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
jsipek@fsl.cs.sunysb.edu, unionfs@filesystems.org,
bunk@stusta.de, hooanon05@yahoo.co.jp
Subject: Re: [PATCH 1/3] slab: introduce krealloc
Date: Wed, 21 Feb 2007 20:37:34 +0200 [thread overview]
Message-ID: <45DC916E.1020300@cs.helsinki.fi> (raw)
In-Reply-To: <Pine.LNX.4.64.0702211023300.24719@schroedinger.engr.sgi.com>
Hi Christoph,
Christoph Lameter wrote:
> 1. Just do not allow shrinking via realloc. Probably no big loss and best
> performance.
Not a big loss if you can afford the wasted memory. But, I don't think
we should do this, there's no way for the caller to know that we will
hold on to the memory indefinitely.
Christoph Lameter wrote:
> 2. Check if the size specified is larger than the next smallest general
> cache and only copy if we would really would allocate from a different
> cache.
Yeah, I was thinking about this too but decided against it (for now) as
I am mostly concerned with removing the slab abuses from unionfs. Also,
it is not immediately obvious we want to do this for all cases of
krealloc so I'd prefer to keep the API for a while and decide to
optimize or not optimize later. Note that we would only get rid of one
of the kfree callers, the other one doesn't want to do krealloc(), it
never reuses the old values.
Pekka
next prev parent reply other threads:[~2007-02-21 18:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-21 8:06 [PATCH 1/3] slab: introduce krealloc Pekka J Enberg
2007-02-21 9:24 ` Arjan van de Ven
2007-02-21 9:33 ` Pekka Enberg
2007-02-21 9:36 ` Arjan van de Ven
2007-02-21 17:51 ` Christoph Lameter
2007-02-21 17:53 ` Christoph Lameter
2007-02-21 18:21 ` Pekka Enberg
2007-02-21 18:27 ` Christoph Lameter
2007-02-21 18:37 ` Pekka Enberg [this message]
2007-02-21 18:48 ` Christoph Lameter
2007-02-21 19:19 ` Pekka Enberg
2007-02-21 19:22 ` Christoph Lameter
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=45DC916E.1020300@cs.helsinki.fi \
--to=penberg@cs.helsinki.fi \
--cc=akpm@linux-foundation.org \
--cc=bunk@stusta.de \
--cc=clameter@sgi.com \
--cc=hooanon05@yahoo.co.jp \
--cc=jsipek@fsl.cs.sunysb.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=unionfs@filesystems.org \
/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.