Re: SLUB sysfs support

2008-01-02 Thread Christoph Lameter
On Fri, 28 Dec 2007, Al Viro wrote: > On Thu, Dec 27, 2007 at 06:19:46PM -0800, Christoph Lameter wrote: > > nfsd4_delegations? What is this about? > > The random lifetimes of user-visible files you create in sysfs. Well these are symlinks. > > How do I scan for the symlinks in sysfs? > > At w

Re: SLUB sysfs support

2007-12-27 Thread Al Viro
On Thu, Dec 27, 2007 at 06:19:46PM -0800, Christoph Lameter wrote: > nfsd4_delegations? What is this about? The random lifetimes of user-visible files you create in sysfs. > How do I scan for the symlinks in sysfs? At which point are you going to do that? AFAICS, the fundamental problem is that

Re: SLUB sysfs support

2007-12-27 Thread Christoph Lameter
On Fri, 28 Dec 2007, Al Viro wrote: > Oh, lovely. So we can have module A do kmem_cache_create(), calling > cache "foo". Then module B does (without any knowlegde about A) > completely unrelated kmem_cache_create(), calling the sucker "bar". > mm/slub decides that they are mergable. Then we get

Re: SLUB sysfs support

2007-12-27 Thread Al Viro
On Thu, Dec 27, 2007 at 04:02:56PM -0800, Christoph Lameter wrote: > > Why would you want these symlinks to stick around for longer than that? > > /sys/kernel/slab/cache_name is a real directory but then there are the > aliases in /sys/kernel/slab/alias_name pointing to that directory that > als

Re: SLUB sysfs support

2007-12-27 Thread Christoph Lameter
On Thu, 27 Dec 2007, Al Viro wrote: > On Thu, Dec 27, 2007 at 03:53:43PM -0800, Christoph Lameter wrote: > > On Thu, 27 Dec 2007, Christoph Lameter wrote: > > > > > > a) remove symlink when slab goes away > > > > > > Ok. Need to think about how to code that. > > > > How do I iterate over all sy

Re: SLUB sysfs support

2007-12-27 Thread Al Viro
On Thu, Dec 27, 2007 at 03:53:43PM -0800, Christoph Lameter wrote: > On Thu, 27 Dec 2007, Christoph Lameter wrote: > > > > a) remove symlink when slab goes away > > > > Ok. Need to think about how to code that. > > How do I iterate over all symlinks in /sys/kernel/slab/*? > > I remember trying

Re: SLUB sysfs support

2007-12-27 Thread Al Viro
On Thu, Dec 27, 2007 at 03:22:28PM -0800, Christoph Lameter wrote: > > a) remove symlink when slab goes away > > Ok. Need to think about how to code that. Huh? Just call it from kmem_cache_destroy(); what business does that symlink have being around after that point? > > b) instead of kfree() i

Re: SLUB sysfs support

2007-12-27 Thread Christoph Lameter
On Thu, 27 Dec 2007, Christoph Lameter wrote: > > a) remove symlink when slab goes away > > Ok. Need to think about how to code that. How do I iterate over all symlinks in /sys/kernel/slab/*? I remember trying to do it before and not being able to find a sysfs method for that. -- To unsubscri

Re: SLUB sysfs support

2007-12-27 Thread Christoph Lameter
On Thu, 27 Dec 2007, Al Viro wrote: > On Thu, Dec 27, 2007 at 12:28:14PM -0800, Christoph Lameter wrote: > > Hmmm.. If I separately allocate the kobject then I can no longer get to > > the kmem_cache structure from the kobject. > > > > I need to add a second kobject_del to sysfs_slab_remove() t

Re: SLUB sysfs support

2007-12-27 Thread Al Viro
On Thu, Dec 27, 2007 at 12:28:14PM -0800, Christoph Lameter wrote: > Hmmm.. If I separately allocate the kobject then I can no longer get to > the kmem_cache structure from the kobject. > > I need to add a second kobject_del to sysfs_slab_remove() to make sysfs > completely forget about the obj

SLUB sysfs support

2007-12-27 Thread Christoph Lameter
Hmmm.. If I separately allocate the kobject then I can no longer get to the kmem_cache structure from the kobject. I need to add a second kobject_del to sysfs_slab_remove() to make sysfs completely forget about the object? Probably should track down any remaining symlinks at that point and nuk