[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <45DC916E.1020300@cs.helsinki.fi>
Date: Wed, 21 Feb 2007 20:37:34 +0200
From: Pekka Enberg <penberg@...helsinki.fi>
To: Christoph Lameter <clameter@....com>
CC: akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
jsipek@....cs.sunysb.edu, unionfs@...esystems.org, bunk@...sta.de,
hooanon05@...oo.co.jp
Subject: Re: [PATCH 1/3] slab: introduce krealloc
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists