Skip to content

RFC Per-sb tracking of dirty inodes

Jan Kara linux-fsdevel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest14 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14writeback: Get rid of superblock pinningfs/fs-writeback.c include/trace/events/writeback.h+17 -900 replies
2/14writeback: Remove writeback_inodes_wb()fs/fs-writeback.c+8 -210 replies
3/14writeback: Remove useless argument of writeback_single_inode()fs/fs-writeback.c+4 -50 replies
4/14writeback: Don't put inodes which cannot be written to b_more_iofs/fs-writeback.c include/trace/events/writeback.h+4 -230 replies
5/14writeback: Move dwork and last_old_flush into backing_dev_infofs/fs-writeback.c include/linux/backing-dev.h mm/backing-dev.c+19 -190 replies
6/14writeback: Switch locking of bandwidth fields to wb_lockfs/fs-writeback.c include/linux/backing-dev.h mm/page-writeback.c+9 -40 replies
7/14writeback: Provide a function to get bdi from bdi_writebackfs/fs-writeback.c include/linux/backing-dev.h include/trace/events/writeback.h+19 -130 replies
8/14writeback: Schedule future writeback if bdi (not wb) has dirty inodesfs/fs-writeback.c+1 -10 replies
9/14writeback: Switch some function arguments from bdi_writeback to bdifs/fs-writeback.c+22 -260 replies
10/14writeback: Move rechecking of work list into bdi_process_work_items()fs/fs-writeback.c+7 -50 replies
11/14writeback: Shorten list_lock hold times in bdi_writeback()fs/fs-writeback.c+2 -20 replies
12/14writeback: Move refill of b_io list into writeback_inodes()fs/fs-writeback.c+7 -60 replies
13/14writeback: Comment updatefs/fs-writeback.c+36 -160 replies
14/14writeback: Per-sb dirty trackingfs/block_dev.c fs/fs-writeback.c fs/inode.c +5 more+179 -986 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [RFC PATCH 00/14] Per-sb tracking of dirty inodes

Hello,

here is my attempt to implement per superblock tracking of dirty inodes.
I have two motivations for this:
1) I've tried to get rid of overwriting of inode's dirty time stamp during writeback and filtering of dirty inodes by superblock makes this significantly harder. For similar reasons also improving scalability of inode dirty tracking is more complicated than it has to be.
2) Filesystems like Tux3 (but to some extent also XFS) would like to influence order in which inodes are written back. Currently this isn't possible. Tracking dirty inodes per superblock makes it easy to later implement filesystem callback for writing back inodes and also possibly allow filesystems to implement their own dirty tracking if they desire.

The patches pass xfstests run and also some sync livelock avoidance tests
I have with 4 filesystems on 2 disks so they should be reasonably sound. Before I go and base more work on this I'd like to hear some feedback about whether people find this sane and workable.

After this patch set it is trivial to provide a per-sb callback for writeback (at level of writeback_inodes()). It is also fairly easy to allow filesystem to completely override dirty tracking (only needs some restructuring of mark_inode_dirty()). I can write these as a proof-of-concept patches for Tux3 guys once the general approach in this patch set is acked. Or if there are some in-tree users (XFS?, btrfs?) I can include them in the patch set.

Any comments welcome!

Honza