Re: [PATCH 5/5] Stop pinning dentries & inodes for leaves

From: viro
Date: Tue Aug 03 2004 - 08:04:31 EST


On Thu, Jul 29, 2004 at 03:44:49PM -0500, Maneesh Soni wrote:
>
>
>
> o This patch stops the pinning of non-directory or leaf dentries and inodes.
> The leaf dentries and inodes are created during lookup based on the
> entries on sysfs_dirent tree. These leaves are removed from the dcache
> through the VFS dentry ageing process during shrink dcache operations. Thus
> reducing about 80% of sysfs lowmem needs.
>
> o This implments the ->lookup() for sysfs directory inodes and allocates
> dentry and inode if the lookup is successful and avoids the need of
> allocating and pinning of dentry and inodes during the creation of
> corresponding sysfs leaf entry. As of now the implementation has not
> required negative dentry creation on failed lookup. As sysfs is still a
> RAM based filesystem, negative dentries are not of any use IMO.
>
> o The leaf dentry allocated after successful lookup is connected to the
> existing corresponding sysfs_dirent through the d_fsdata field. This
> increments the ref count of sysfs_dirent. The ref count is released through
> ->d_iput() dentry_operation when dentry dies.

ACK; there's some reordering that might make sense here, but that depends on
what will fall out of changes in previous chunks.
-
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/