Messages in this thread | | | Date | Wed, 12 Nov 2003 21:57:40 +0530 | From | Dipankar Sarma <> | Subject | Re: [RFC 0/5] Backing Store for sysfs (Overhauled) |
| |
On Wed, Nov 12, 2003 at 08:00:15AM -0800, Greg KH wrote: > On Wed, Nov 12, 2003 at 05:53:44PM +0530, Maneesh Soni wrote: > > > > The concept is still the same that in this prototype also we create dentry and > > inode on the fly when they are first looked up. This is done for both leaf or > > non-leaf dentries. The generic nature of sysfs_dirent makes it easy to do for > > both leaf or non-leaf dentries. > > What happens once a dentry and inode is created? Is there any way for > them to be forced out, or do they stay around in memory forever?
The idea atleast, is that if no one is using a dentry, it will be put in the dentry lru list and eventually returned to the slab. inodes too are returned alongwith. Just like how on-disk filesystems work.
Typically, an open() of a sysfs file would result in creation of the corresponding dentry/inode and holding of the reference. close() releases the reference. The last one to release puts the dentry in the lru list for later pruning. The result is that we have less memory use and smaller number of dcache hash table elements under normal circumstances.
THanks Dipankar - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |