Re: [patch 2/2] slub: addDocumentation/ABI/testing/sysfs-kernel-slab

From: David Rientjes
Date: Thu Apr 23 2009 - 18:26:34 EST


On Thu, 23 Apr 2009, David Rientjes wrote:

> Adds documentation for the slub ABI.
>
> This is placed in the `testing' directory since the meanings of these
> files are still subject to change as slub is developed.
>

I just noticed that slqb also uses /sys/kernel/slab for its sysfs API, so
this isn't going to work unless

- slqb uses /sys/kernel/slab as well and we simply add its files in
sysfs-kernel-slab and leave it to userspace to test for which allocator
is actually being used. Both allocators share many of the same
fundamental attributes but some are only applicable to one,

- slqb moves to /sys/kernel/slqb since slub is already resident in
/sys/kernel/slab and the mm/slab.c allocator actually has no sysfs
interface, or

- this file is renamed to sysfs-kernel-slub and a sysfs-kernel-slab file
is created that simply points users to the correct ABI file depending
on their configuration.

I'd be included to suggest that slqb moves to /sys/kernel/slqb despite the
naming disparity between slub and its ABI in /sys/kernel/slab.

Opinions?


slqb: move sysfs API into slqb directory

SLUB already has a sysfs API in the `slab' directory, so SLQB must use
`slqb'.

Cc: Nick Piggin <npiggin@xxxxxxx>
Signed-off-by: David Rientjes <rientjes@xxxxxxxxxx>
---
diff --git a/mm/slqb.c b/mm/slqb.c
--- a/mm/slqb.c
+++ b/mm/slqb.c
@@ -3536,7 +3536,7 @@ static int __init slab_sysfs_init(void)
struct kmem_cache *s;
int err;

- slab_kset = kset_create_and_add("slab", &slab_uevent_ops, kernel_kobj);
+ slab_kset = kset_create_and_add("slqb", &slab_uevent_ops, kernel_kobj);
if (!slab_kset) {
printk(KERN_ERR "Cannot register slab subsystem.\n");
return -ENOSYS;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/