Skip to content

Quota scalability patches

Jan Kara linux-fsdevel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest27 patches 3 repliesIn review
  2. v127 patches 26 repliesSuperseded

Changes in v2 from the cover letter

* Improvements from Andreas Dilger
* Added Andreas' Reviewed-by tags

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/27quota: Convert dqio_mutex to rwsemfs/ext4/super.c fs/ocfs2/quota_global.c fs/ocfs2/quota_local.c +4 more+36 -410 replies
2/27quota: Do more fine-grained locking in dquot_acquire()fs/quota/dquot.c+6 -30 replies
3/27quota: Acquire dqio_sem for reading in dquot_get_next_id()fs/quota/dquot.c+2 -20 replies
4/27quota: Acquire dqio_sem for reading in vfs_load_quota_inode()fs/ocfs2/quota_local.c fs/quota/dquot.c+6 -60 replies
5/27quota: Protect dquot writeout with dq_lockfs/quota/dquot.c+14 -140 replies
6/27quota: Push dqio_sem down to ->read_dqblk()fs/quota/dquot.c fs/quota/quota_v1.c fs/quota/quota_v2.c+14 -60 replies
7/27quota: Remove locking for reading from the old quota formatfs/quota/quota_v1.c+0 -20 replies
8/27quota: Push dqio_sem down to ->write_dqblk()fs/quota/dquot.c fs/quota/quota_v1.c fs/quota/quota_v2.c+16 -80 replies
9/27quota: Do not acquire dqio_sem for dquot overwrites in v2 formatfs/quota/quota_v2.c+14 -30 replies
10/27quota: Remove locking for writing to the old quota formatfs/quota/quota_v1.c+0 -30 replies
11/27quota: Push dqio_sem down to ->release_dqblk()fs/quota/dquot.c fs/quota/quota_v2.c+10 -30 replies
12/27quota: Push dqio_sem down to ->get_next_id()fs/quota/dquot.c fs/quota/quota_v2.c+8 -60 replies
13/27quota: Push dqio_sem down to ->write_file_info()fs/ocfs2/quota_global.c fs/quota/dquot.c fs/quota/quota_v1.c +1 more+13 -120 replies
14/27quota: Push dqio_sem down to ->read_file_info()fs/ocfs2/quota_local.c fs/quota/dquot.c fs/quota/quota_v1.c +1 more+23 -180 replies
15/27quota: Fix error codes in v2_read_file_info()fs/quota/quota_v2.c+3 -30 replies
16/27quota: Propagate ->quota_read errors from v2_read_file_info()fs/quota/quota_v2.c+11 -70 replies
17/27quota: Fix possible corruption of dqi_flagsfs/quota/dquot.c fs/quota/quota_v1.c+10 -30 replies
18/27quota: Do not dirty bad dquotsfs/quota/dquot.c+7 -80 replies
19/27quota: Move locking into clear_dquot_dirty()fs/quota/dquot.c+6 -90 replies
20/27quota: Remove dq_wait_unused from dquotfs/quota/dquot.c include/linux/quota.h+7 -110 replies
21/27quota: Allow disabling tracking of dirty dquots in a listfs/quota/dquot.c include/linux/quota.h+9 -00 replies
22/27ext4: Disable dirty list tracking of dquots when journalling quotasfs/ext4/super.c+8 -10 replies
23/27quota: Inline functions into their callsitesfs/quota/dquot.c include/linux/quotaops.h+28 -490 replies
24/27quota: Inline inode_{incr,decr}_space() into callsitesfs/quota/dquot.c+28 -270 replies
25/27quota: Inline dquot_[re]claim_reserved_space() into callsitefs/quota/dquot.c+16 -250 replies
26/27fs: Provide __inode_get_bytes()fs/stat.c include/linux/fs.h+5 -10 replies
27/27quota: Reduce contention on dq_data_lockfs/ext4/super.c fs/ocfs2/quota_global.c fs/ocfs2/quota_local.c +3 more+186 -1320 replies

Reviews trailers per patch

14 of 27 patches have a Reviewed-by or Acked-by.

PatchAndreas Dilger
1/27
2/27
3/27R-b
4/27R-b
5/27R-b
6/27R-b
7/27R-b
8/27R-b
9/27R-b
10/27R-b
11/27R-b
12/27R-b
13/27R-b
14/27R-b
15/27R-b
16/27
17/27
18/27
19/27R-b
20/27
21/27
22/27
23/27
24/27
25/27
26/27
27/27

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

Read the v2 thread

Cover letter [PATCH 0/27 v2] Quota scalability patches

Hello,

this is a series of patches that address scalability issues in quota subsystem. For my testing I've used a synthetic benchmark where 50 different processes are creating files 10000 files each in separate directories (either for different or the same user). I've been testing on a machine with 48 CPUs with 64GB of RAM over either SATA drive or ramdisk. Different patches have shown improvements in different configs (see details in the changelog). Also Wang Shilong gave some testing to my patches and in his setup he saw about 100% improvement for file creation and about 50% improvement for file unlink.

The patches have passed xfstests on ext4.

First 14 patches convert users of a global dqio_mutex to rw semaphore and also avoid using the semaphore altogether in cases where we don't need it - in particular we now use dquot->dq_lock for protecting writeout of dquot (which happens very frequently on every usage change). Patches 15-18 are smaller fixes / cleanups. Patches 19-22 allow filesystem to not use dirty dquot list (as e.g. ext4 does not need it), reducing contention on global dq_list_lock significantly. Patches 23-27 remove use of global dq_data_lock for quota usage changes (by using new dquot->dq_dqb_lock).

Full series can be also fetched from my tree at:

git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs.git quota_scaling

Unless someone objects, I'll queue the patches in my tree for the next merge window.

Changes since v1:
* Improvements from Andreas Dilger
* Added Andreas' Reviewed-by tags

Honza