Skip to content

sysfs backing store (with symlink)

Maneesh Soni lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6sysfs backing store (with symlink)fs/sysfs/mount.c include/linux/sysfs.h+45 -20 replies
2/6sysfs backing store (with symlink)fs/sysfs/dir.c+332 -330 replies
3/6sysfs backing store (with symlink)fs/sysfs/file.c fs/sysfs/inode.c+40 -370 replies
4/6sysfs backing store (with symlink)fs/sysfs/bin.c+19 -330 replies
5/6sysfs backing store (with symlink)fs/sysfs/symlink.c+25 -90 replies
6/6sysfs backing store (with symlink)fs/sysfs/group.c fs/sysfs/sysfs.h+78 -40 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC/T 0/6] sysfs backing store (with symlink)

Hi All,

Please find following patches for sysfs-backing store. This version has support for putting symlinks also on backing store. Earlier it has support for text/binary attribute files.

http://marc.theaimsgroup.com/?l=linux-kernel&m=107269078726254&w=2

Apart from a few bug fixes, the main change in this version is for symlinks. sysfs_create_link() now does not create dentry/inode for the link, but allocates a sysfs_dirent and adds it the parent sysfs_dirent's s_children list. dentry/inode for the link is created when the symlink is first looked up.

I request Martin and Mackall to _replace_ the old patch set with the new one in their trees.

With this we save approx 75-80% of lowmem requirements of sysfs. Symlinks support is needed for S390 linux people as they create lots of symlinks. I have some numbers collected on S390 machine after creating 4096 ctc devices. This created around 62433 sysfs entries. Backing store saves around 145 MB of Lowmem when sysfs files are not in use.

---------------------------------------------------------------------------
Without sysfs backing store

# cat /proc/sys/fs/dentry-state
66733   4100    45      0       0       0
# grep LowFree /proc/meminfo
LowFree:         20984 kB
# grep dentry /proc/slabinfo; grep -w inode_cache /proc/slabinfo
dentry_cache       66750  66750    256   15    1 : tunables  120   60    8 : slabdata   4450   4450      0
inode_cache        62480  62480    768    5    1 : tunables   54   27    8 : slabdata  12496  12496      0

---------------------------------------------------------------------------
---------------------------------------------------------------------------
With sysfs backing store

# cat /proc/sys/fs/dentry-state 
8783    155     45      0       0       0
# grep LowFree /proc/meminfo
LowFree:        166416 kB
# grep dentry /proc/slabinfo; grep -w inode_cache /proc/slabinfo
dentry_cache        8795   8880    256   15    1 : tunables  120   60    8 : slabdata    592    592      0
inode_cache         8495   8495    768    5    1 : tunables   54   27    8 : slabdata   1699   1699      0

**** Savings of around 145 MB of Lowmem *****
---------------------------------------------------------------------------

Thanks
Maneesh

Signature · 6 lines
Maneesh Soni
Linux Technology Center, 
IBM Software Lab, Bangalore, India
email: [email protected]
Phone: 91-80-5044999 Fax: 91-80-5268553
T/L : 9243696