Skip to content

my current vfs scalability patch queue

[email protected] linux-fsdevel lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest33 patches 31 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/33fs: no games with DCACHE_UNHASHEDfs/anon_inodes.c fs/pipe.c net/socket.c+0 -530 replies
2/33fs: cleanup files_lockdrivers/char/pty.c drivers/char/tty_io.c fs/file_table.c +4 more+49 -420 replies
3/33fs: scale files_lockfs/file_table.c fs/super.c include/linux/fs.h+143 -414 replies
4/33fs: brlock vfsmount_lockfs/dcache.c fs/namei.c fs/namespace.c +5 more+161 -816 replies
5/33fs: scale mntget/mntputfs/libfs.c fs/namespace.c fs/pnode.c +1 more+121 -371 reply
6/33fs: dcache scale hashfs/dcache.c include/linux/dcache.h+27 -110 replies
7/33fs: dcache scale lrufs/dcache.c+85 -200 replies
8/33fs: dcache scale nr_dentryfs/dcache.c include/linux/dcache.h kernel/sysctl.c+17 -132 replies
9/33fs: dcache scale dentry refcountarch/powerpc/platforms/cell/spufs/inode.c drivers/infiniband/hw/ipath/ipath_fs.c fs/autofs4/expire.c +19 more+156 -774 replies
10/33fs: dcache scale d_unhashedarch/powerpc/platforms/cell/spufs/inode.c fs/configfs/configfs_internal.h fs/dcache.c +4 more+68 -220 replies
11/33fs: dcache scale subdirsdrivers/usb/core/inode.c fs/autofs4/expire.c fs/autofs4/inode.c +13 more+274 -8110 replies
12/33fs: scale inode alias listfs/affs/amigaffs.c fs/dcache.c fs/exportfs/expfs.c +6 more+70 -70 replies
13/33fs: use RCU / seqlock logic for reverse and multi-step operaitonsdrivers/staging/pohmelfs/path_entry.c fs/autofs4/waitq.c fs/dcache.c +2 more+134 -150 replies
14/33fs: dcache remove dcache_lockDocumentation/filesystems/Locking arch/powerpc/platforms/cell/spufs/inode.c drivers/infiniband/hw/ipath/ipath_fs.c +30 more+37 -2500 replies
15/33fs: dcache reduce dput lockingfs/dcache.c+32 -270 replies
16/33fs: dcache per-bucket dcache hash lockingfs/dcache.c include/linux/dcache.h+115 -1022 replies
17/33fs: dcache reduce dcache_inode_lockfs/dcache.c+11 -120 replies
18/33fs: dcache per-inode inode alias lockingfs/affs/amigaffs.c fs/dcache.c fs/exportfs/expfs.c +6 more+89 -680 replies
19/33fs: icache lock s_inodes listfs/drop_caches.c fs/fs-writeback.c fs/hugetlbfs/inode.c +5 more+33 -00 replies
20/33fs: icache lock inode hashfs/hugetlbfs/inode.c fs/inode.c include/linux/writeback.h+31 -10 replies
21/33fs: icache lock i_statefs/drop_caches.c fs/fs-writeback.c fs/hugetlbfs/inode.c +3 more+127 -290 replies
22/33fs: icache lock i_countarch/powerpc/platforms/cell/spufs/file.c fs/affs/inode.c fs/afs/dir.c +48 more+200 -950 replies
23/33fs: icache atomic inodes_statfs/cifs/inode.c fs/fs-writeback.c fs/hugetlbfs/inode.c +3 more+26 -210 replies
24/33fs: icache lock lru/writeback listsfs/fs-writeback.c fs/hugetlbfs/inode.c fs/inode.c +1 more+81 -190 replies
25/33fs: icache protect inode statefs/hugetlbfs/inode.c fs/inode.c+35 -80 replies
26/33fs: inode atomic last_ino, iunique lockfs/inode.c+22 -60 replies
27/33fs: icache remove inode_lockfs/buffer.c fs/drop_caches.c fs/fs-writeback.c +6 more+26 -1110 replies
28/33fs: inode factor hash lock into functionsfs/hugetlbfs/inode.c fs/inode.c include/linux/fs.h +1 more+21 -170 replies
29/33Remove the global inode_hash_lock and replace it with per-hash-bucket locks. fs: inode per-bucket inode hash locksfs/inode.c+90 -771 reply
30/33fs: inode lazy lrufs/fs-writeback.c fs/inode.c include/linux/fs.h +1 more+33 -380 replies
31/33fs: RCU free inodesfs/block_dev.c fs/ext2/super.c fs/ext3/super.c +6 more+68 -90 replies
32/33fs: rcu walk for i_sb_listfs/drop_caches.c fs/fs-writeback.c fs/hugetlbfs/inode.c +4 more+34 -710 replies
33/33fs: improve scalability of pseudo filesystemsfs/anon_inodes.c fs/notify/inotify/inotify.c fs/pipe.c +2 more+5 -50 replies

Reviews trailers per patch

1 of 33 patches has a Reviewed-by or Acked-by.

PatchMiklos Szeredi
1/33A-b
2/33
3/33
4/33
5/33
6/33
7/33
8/33
9/33
10/33
11/33
12/33
13/33
14/33
15/33
16/33
17/33
18/33
19/33
20/33
21/33
22/33
23/33
24/33
25/33
26/33
27/33
28/33
29/33
30/33
31/33
32/33
33/33

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [patch 00/33] my current vfs scalability patch queue

Hi,

Had a bit of time to work on my vfs scalability patches. Since last time: made some bugfixes, scaled mntget/mntput with per-cpu counter and vfsmount brlock, and worked on inode cache scalability. This last one is the most interesting... with my last posting I had got as far as breaking the locks into constituent parts, but they remained mostly global locks.

- I have now made per-bucket hash lock like the dcache (it still needs to be made into bitlocks to avoid any bloat, but using spinlocks for now helps eg with lockdep).

- Made the inode unused lru list into a lazy list like the dcache. This reduces acquisitions of the lru/writeback list lock.

- Made inode rcu freed. This can enable further optimisations. But it is quite a big change on its own worth noting.

- RCU freed inode enables the sb_inode_list_lock to be avoided in list walkers, and therefore allows it to nest within i_lock. This significantly simplifies the locking and reduces acquisitions of sb_inode_list_lock.

Some remaining obvious issues:

- Not all filesystems are completely audited, especially when it comes to looking at inode/dentry callbacks now done with locks lifted.

- Global dcache_lru lock. This can be made per-zone which will improve scalability and enable more efficient targetted reclaim. Needs some of my old per-zone reclaim shrinker patches.

- inode sb list lock is limiting global rate of inode creation, inode wb list lock is limiting global rate of inode dirtying and writeback.

- Inode writeback list lock tied with inode lru list lock (they use the same list head). Could turn them into 2 locks. Then the lru lock can be made per-zone. The writeback lock I will wait on Jens' writeback work.

- sb_inode_list_lock can be made per-sb. This is a reasonable step, but not good for single-sb scalability. Could perhaps add some per-cpu magazines or laziness to reduce some of this locking. Most walkers of this list are slowpaths, so it could be split into percpu lists or something.

- inode lru lock could also be made per-zone.

- dentries and inodes are now rcu freed, some (most?) nested trylock loops could be removed in favour of taking the correct lock order and then re-checking that things haven't changed.

The reason I have had to go on with more changes to locking rather than trying to get things merged is because it has been difficult to show improvements in some cases, like for example in the inode cache lock breaking, it first resulted in actually more global locks for different things so scalability could be worse in some cases when multiple global locks need to be taken.

But it is now getting to the point where I will need to get some agreement with the approach.