From: Pekka Enberg <[email protected]>
This exports ksize in slab and slob allocators to modules.
Cc: Christoph Lameter <[email protected]>
Signed-off-by: Pekka Enberg <[email protected]>
---
mm/slab.c | 1 +
mm/slob.c | 2 ++
2 files changed, 3 insertions(+)
Index: 2.6/mm/slab.c
===================================================================
--- 2.6.orig/mm/slab.c 2007-02-21 09:46:16.000000000 +0200
+++ 2.6/mm/slab.c 2007-02-21 09:46:25.000000000 +0200
@@ -4485,3 +4485,4 @@
return obj_size(virt_to_cache(objp));
}
+EXPORT_SYMBOL(ksize);
Index: 2.6/mm/slob.c
===================================================================
--- 2.6.orig/mm/slob.c 2007-02-21 09:46:28.000000000 +0200
+++ 2.6/mm/slob.c 2007-02-21 09:46:42.000000000 +0200
@@ -240,6 +240,8 @@
return ((slob_t *)block - 1)->units * SLOB_UNIT;
}
+EXPORT_SYMBOL(ksize);
+
struct kmem_cache {
unsigned int size, align;
const char *name;
On Wed, Feb 21, 2007 at 10:06:52AM +0200, Pekka J Enberg wrote:
> From: Pekka Enberg <[email protected]>
>
> This exports ksize in slab and slob allocators to modules.
That's a pretty generic name... if it's going to be part of the module
API, it should be renamed to something a bit more obvious.
Cheers,
Muli
Hi Muli,
On Wed, Feb 21, 2007 at 10:06:52AM +0200, Pekka J Enberg wrote:
> > This exports ksize in slab and slob allocators to modules.
On Wed, 21 Feb 2007, Muli Ben-Yehuda wrote:
> That's a pretty generic name... if it's going to be part of the module
> API, it should be renamed to something a bit more obvious.
Well, it is the established slab API so I am bit relucant to change it.
But if someone comes up with a better name, why not...
Pekka
On Wed, 2007-02-21 at 10:06 +0200, Pekka J Enberg wrote:
> From: Pekka Enberg <[email protected]>
>
> This exports ksize in slab and slob allocators to modules.
what's the user of this? If none, don't export it please since every
useless export does take up space.
Please specify the use in the description of the patch!
On Wed, 21 Feb 2007, Arjan van de Ven wrote:
> Please specify the use in the description of the patch!
See [PATCH 3/3] unionfs: fix up slab abuses.
Pekka
On Wed, 21 Feb 2007, Muli Ben-Yehuda wrote:
> On Wed, Feb 21, 2007 at 10:06:52AM +0200, Pekka J Enberg wrote:
> > From: Pekka Enberg <[email protected]>
> >
> > This exports ksize in slab and slob allocators to modules.
>
> That's a pretty generic name... if it's going to be part of the module
> API, it should be renamed to something a bit more obvious.
Hmmm... The current names are
kmalloc
kcalloc
kzalloc
kfree
ksize
All are pretty terse and most are frequently used (except ksize and
maybe kcalloc).