]> bbs.cooldavid.org Git - net-next-2.6.git/commit
sysfs: use singly-linked list for sysfs_dirent tree
authorTejun Heo <htejun@gmail.com>
Wed, 13 Jun 2007 18:45:18 +0000 (03:45 +0900)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 11 Jul 2007 23:09:07 +0000 (16:09 -0700)
commit0c73f18b7d95de8a007039337063a770b5fc8e7a
treecf3b6f274139b170136219918dd679f2397e69f6
parent8619f979898397582e366877fd5feeba7560d70c
sysfs: use singly-linked list for sysfs_dirent tree

Make sysfs_dirent use singly linked list for its tree structure.
sysfs_link_sibling() and sysfs_unlink_sibling() functions are added to
handle simpler cases.  It adds some complexity and cpu cycle overhead
but reduced memory footprint is worthwhile on big machines.

This change reduces the sizeof sysfs_dirent from 104 to 88 on 64bit
and from 60 to 52 on 32bit.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/sysfs/dir.c
fs/sysfs/inode.c
fs/sysfs/mount.c
fs/sysfs/sysfs.h