public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC 0/6] Backing Store for sysfs
@ 2003-10-06  8:59 Maneesh Soni
  2003-10-06  9:00 ` [RFC 1/6] sysfs-kobject.patch Maneesh Soni
                   ` (2 more replies)
  0 siblings, 3 replies; 33+ messages in thread
From: Maneesh Soni @ 2003-10-06  8:59 UTC (permalink / raw)
  To: Al Viro, Patrick Mochel, Greg KH; +Cc: LKML, Dipankar Sarma


Hi,

The following patch set(mailed separately) provides a prototype for a backing 
store mechanism for sysfs. Currently sysfs pins all its dentries and inodes in 
memory there by wasting kernel lowmem even when it is not mounted. 

With this patch set we create sysfs dentry whenever it is required like 
other real filesystems and, age and free it as per the dcache rules. We
now save significant amount of Lowmem by avoiding un-necessary pinning. 
The following numbers were on a 2-way system with 6 disks and 2 NICs with 
about 1028 dentries. The numbers are just indicative as they are system
wide collected from /proc and are not exclusively for sysfs.

				2.6.0-test6		With patches.
Right after system is booted
---------------------------
dentry_cache (active)		2343			1315
inode_cache (active)		1058			30
LowFree				875096 KB		875900 KB

After mounting sysfs
-------------------
dentry_cache (active)		2350			1321
inode_cache (active)		1058			31
LowFree				875096 KB		875836 KB

After "find /sys"
-----------------
dentry_cache (active)		2520			2544
inode_cache (active)		1058			1050
LowFree				875032 KB		874748 KB

After un-mounting sysfs
-----------------------
dentry_cache (active)		2363			1319
inode_cache (active)		1058			30
LowFree				875032 KB		875836 KB


The main idea is not create the dentry in sysfs_create_xxx calls but create
the dentry when it is first lookup. We now have lookup() inode_operation, 
open and close file_operations for sysfs directory inodes. 

The backing store is based on the kobjects which are always there in memory.
sysfs lookup is based on hierarchy of kobjects. As the current kobject 
infrastructure donot provide any means to traverse the kobject's children or 
siblings, two-way hierarchy lookup was not possible. For this new fields 
are added to kobject structure. This ended up increasing the size of kobject
from 52 bytes to 108 bytes but saving one dentry and inode per kobject.

The details of the patches are in the following mails. For testing please
apply all the patches as they are splitted just for ease of review.

Please send me comments on the approach, implementation, missed things and 
suggestions to improve them.

Thanks,
Maneesh

-- 
Maneesh Soni
Linux Technology Center, 
IBM Software Lab, Bangalore, India
email: maneesh@in.ibm.com
Phone: 91-80-5044999 Fax: 91-80-5268553
T/L : 9243696

^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2003-10-07  9:08 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-06  8:59 [RFC 0/6] Backing Store for sysfs Maneesh Soni
2003-10-06  9:00 ` [RFC 1/6] sysfs-kobject.patch Maneesh Soni
2003-10-06  9:00   ` [RFC 2/6] sysfs-mount.patch Maneesh Soni
2003-10-06  9:01     ` [RFC 3/6] sysfs-file.patch Maneesh Soni
2003-10-06  9:01       ` [RFC 4/6] sysfs-symlink.patch Maneesh Soni
2003-10-06  9:02         ` [RFC 5/6] sysfs-attr_group.patch Maneesh Soni
2003-10-06  9:03           ` [RFC 6/6] sysfs-dir.patch Maneesh Soni
2003-10-06 13:43     ` [RFC 2/6] sysfs-mount.patch viro
2003-10-07  7:17       ` Maneesh Soni
2003-10-06 13:41   ` [RFC 1/6] sysfs-kobject.patch viro
2003-10-06 16:16   ` Greg KH
2003-10-06 17:41     ` Dipankar Sarma
2003-10-06 17:44       ` Greg KH
2003-10-06 16:08 ` [RFC 0/6] Backing Store for sysfs Greg KH
2003-10-06 17:31   ` Dipankar Sarma
2003-10-06 17:38     ` Greg KH
2003-10-06 18:01       ` Dipankar Sarma
2003-10-06 18:09         ` Greg KH
2003-10-06 18:31           ` Dipankar Sarma
2003-10-06 18:34             ` Greg KH
2003-10-07  9:08               ` Andreas Jellinghaus
2003-10-06 18:44 ` Patrick Mochel
2003-10-06 19:27   ` Dipankar Sarma
2003-10-06 19:30     ` viro
2003-10-06 20:01       ` Dipankar Sarma
2003-10-06 20:34         ` viro
2003-10-07  4:47       ` Maneesh Soni
2003-10-06 19:33     ` Patrick Mochel
2003-10-06 20:26       ` Dipankar Sarma
2003-10-06 20:29         ` Patrick Mochel
2003-10-07  4:31           ` Maneesh Soni
2003-10-07  5:25             ` Nick Piggin
2003-10-07  7:17               ` Maneesh Soni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox