Skip to content

my inode scaling series for review

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

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest35 patches 34 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/35bit_spinlock: add required includesinclude/linux/bit_spinlock.h+4 -00 replies
2/35kernel: add bl_listinclude/linux/list_bl.h include/linux/rculist_bl.h+269 -00 replies
3/35mm: implement per-zone shrinkerfs/drop_caches.c include/linux/mm.h mm/memory-failure.c +1 more+286 -1073 replies
4/35vfs: convert inode and dentry caches to per-zone shrinkerfs/dcache.c fs/inode.c+44 -260 replies
5/35fs: icache lock s_inodes listfs/drop_caches.c fs/fs-writeback.c fs/inode.c +3 more+36 -00 replies
6/35fs: icache lock inode hashfs/inode.c+32 -10 replies
7/35fs: icache lock i_statefs/drop_caches.c fs/fs-writeback.c fs/inode.c +2 more+148 -302 replies
8/35fs: icache lock i_countarch/powerpc/platforms/cell/spufs/file.c drivers/staging/pohmelfs/inode.c fs/9p/vfs_inode.c +55 more+200 -902 replies
9/35fs: icache lock lru/writeback listsfs/fs-writeback.c fs/inode.c include/linux/writeback.h +1 more+87 -100 replies
10/35fs: icache atomic inodes_statfs/fs-writeback.c fs/inode.c include/linux/fs.h+25 -200 replies
11/35fs: icache lock inode statefs/inode.c+28 -30 replies
12/35fs: inode atomic last_ino, iunique lockfs/inode.c+29 -80 replies
13/35fs: icache remove inode_lockDocumentation/filesystems/Locking Documentation/filesystems/porting Documentation/filesystems/vfs.txt +13 more+60 -1540 replies
14/35fs: icache factor hash lock into functionsfs/inode.c+24 -140 replies
15/35fs: icache per-bucket inode hash locksfs/btrfs/inode.c fs/fs-writeback.c fs/hfs/hfs_fs.h +10 more+129 -1060 replies
16/35fs: icache lazy inode lrufs/fs-writeback.c fs/inode.c include/linux/fs.h +1 more+61 -650 replies
17/35fs: icache RCU free inodesDocumentation/filesystems/porting arch/powerpc/platforms/cell/spufs/inode.c drivers/staging/pohmelfs/inode.c +57 more+539 -1300 replies
18/35fs: avoid inode RCU freeing for pseudo fsfs/inode.c fs/pipe.c include/linux/fs.h +2 more+22 -90 replies
19/35fs: icache remove redundant i_sb_list umount lockingfs/inode.c fs/notify/inode_mark.c+8 -223 replies
20/35fs: icache rcu walk for i_sb_listDocumentation/filesystems/Locking Documentation/filesystems/vfs.txt fs/drop_caches.c +3 more+39 -530 replies
21/35fs: icache per-cpu nr_inodes, non-atomic nr_unused countersfs/fs-writeback.c fs/inode.c include/linux/fs.h +1 more+63 -320 replies
22/35fs: icache per-cpu last_ino allocatorfs/inode.c+40 -70 replies
23/35fs: icache use per-CPU lists and locks for sb inode listsfs/drop_caches.c fs/fs-writeback.c fs/inode.c +6 more+164 -472 replies
24/35fs: icache use RCU to avoid locking in hash lookupsfs/inode.c+16 -160 replies
25/35fs: icache reduce some locking overheadsfs/fs-writeback.c fs/inode.c+9 -40 replies
26/35fs: icache alloc anonymous inode allocationfs/anon_inodes.c fs/inode.c fs/pipe.c +2 more+38 -44 replies
27/35fs: icache split IO and LRU listsfs/fs-writeback.c fs/inode.c fs/nilfs2/mdt.c +2 more+51 -372 replies
28/35fs: icache split writeback and lru locksfs/fs-writeback.c fs/inode.c include/linux/fs.h +1 more+50 -320 replies
29/35fs: icache per-bdi writeback list lockingfs/fs-writeback.c fs/inode.c fs/internal.h +3 more+100 -710 replies
30/35fs: icache lazy LRU avoid LRU locking after IO operationfs/fs-writeback.c+5 -10 replies
31/35fs: icache per-zone inode LRUfs/inode.c include/linux/mmzone.h+56 -3510 replies
32/35fs: icache minimise I_FREEING latencyfs/inode.c+20 -120 replies
33/35fs: icache introduce inode_get/inode_get_ilockfs/9p/vfs_inode.c fs/affs/inode.c fs/afs/dir.c +42 more+72 -1502 replies
34/35fs: inode rename i_count to i_refsDocumentation/filesystems/vfs.txt arch/powerpc/platforms/cell/spufs/file.c drivers/staging/pohmelfs/inode.c +27 more+65 -650 replies
35/35fs: icache document more lock ordersfs/inode.c+2 -00 replies

Reviews trailers per patch

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

PatchPaul E. McKenney
1/35
2/35R-b
3/35
4/35
5/35
6/35
7/35
8/35
9/35
10/35
11/35
12/35
13/35
14/35
15/35
16/35
17/35
18/35
19/35
20/35
21/35
22/35
23/35
24/35
25/35
26/35
27/35
28/35
29/35
30/35
31/35
32/35
33/35
34/35
35/35

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/35] my inode scaling series for review

Here is my famously tardy inode scaling patch set, for review for merging. Yes it is a lot of patches, but it is very well broken out. It is not rocket science -- if you don't understand something please get me to add comments.

Patches 1-13 incrementally take over inode_lock in small, conservative, obvious (as possible) steps. Subsequent patches improve code and performance.

The only significant changes made from the inode scaling work in the vfs-scale tree are merging to mainline, taking review suggestions, changing the patch set to be better split up and improving comments and changelogs.

This is compatible with the rest of the dcache scaling improvements in my tree, including the store-free path walking (rcu-walk).

I don't think Dave Chinner's approach is the way to go for a number of reasons.

* My locking design allows i_lock to lock the entire state of the icache for a particular inode. Not so with Dave's, and he had to add code not required with inode_lock synchronisation or my i_lock synchronisation. I prefer being very conservative about making changes, especially before inode_lock is lifted (which will be the end-point of bisection for any locking breakage before it).

* As far as I can tell, I have addressed all Dave and Christoph's real concerns. The disagreement about the i_lock locking model can easily be solved if they post a couple of small incremental patches to the end of the series, making i_lock locking less regular and no longer protecting icache state of that given inode (like inode_lock was able to pre-patchset). I've repeatedly disagreed with this approach, however.

* I have used RCU for inodes, and structured a lot of the locking around that.
RCU is required for store-free path walking, so it makes more sense IMO to
implement now rather than in a subsequent release (and reworking inode locking to take advantage of it). I have a design sketched for using slab RCU freeing, which is a little more complex, but it should be able to take care of any real-workload regressions if we do discover them.

* I implement per-zone LRU lists and locking, which are desperately required for reasonable NUMA performance, and are a first step towards proper mem controller control of vfs caches (Google have a similar per-zone LRU patch they need for their fakenuma based memory control, I believe).

* I implemented per-cpu locking for inode sb lists. The scalability and single threaded performance of the full vfs-scale stack has been tested quite well. Most of the vfs scales pretty linearly up to several hundreds of sockets at least. I have counted cycles on various x86 and POWER architectures to improve single threaded performance. It's an ongoing process but there has been a lot of work done already there.

We want all these things ASAP, so it doesn't make sense to me to stage out significant locking changes in the icache code over several releases. Just get them out of the way now -- the series is bisectable and reviewable, so I think it will reduce churn and headache for everyone to get it out of the way now.