2007-02-21 08:06:53

by Pekka Enberg

[permalink] [raw]
Subject: [PATCH 2/3] slab: export ksize to modules

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;


2007-02-21 08:14:46

by Muli Ben-Yehuda

[permalink] [raw]
Subject: Re: [PATCH 2/3] slab: export ksize to modules

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

2007-02-21 08:22:53

by Pekka Enberg

[permalink] [raw]
Subject: Re: [PATCH 2/3] slab: export ksize to modules

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

2007-02-21 08:57:19

by Arjan van de Ven

[permalink] [raw]
Subject: Re: [PATCH 2/3] slab: export ksize to modules

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!

2007-02-21 09:03:28

by Pekka Enberg

[permalink] [raw]
Subject: Re: [PATCH 2/3] slab: export ksize to modules

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

2007-02-21 18:33:32

by Christoph Lameter

[permalink] [raw]
Subject: Re: [PATCH 2/3] slab: export ksize to modules

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).