[Top] [All Lists]

[PATCH 0/4] add support for a lazytime mount option

To: linux-fsdevel@xxxxxxxxxxxxxxx
Subject: [PATCH 0/4] add support for a lazytime mount option
From: Theodore Ts'o <tytso@xxxxxxx>
Date: Fri, 21 Nov 2014 14:59:20 -0500
Cc: Ext4 Developers List <linux-ext4@xxxxxxxxxxxxxxx>, xfs@xxxxxxxxxxx, linux-btrfs@xxxxxxxxxxxxxxx, Theodore Ts'o <tytso@xxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=thunk.org; s=ef5046eb; h=Message-Id:Date:Subject:Cc:To:From; bh=sDHJyYASAo2c/1k2tWjW7dPaSCImOFk87ano0iQoqIM=; b=wtlggqqt48lnOUCemrMlfLGa6HFz7nzyEFdU2egmeeXwr3T129kvxLGaV6ueXjyO9l9YJk76OUkorgcXif/MCaYza0QZue4xLxPl9+80RTgmD59d3ULrzlX12VsKgE8RLkJMntqQPmqfAnLmBFS2ARXwpfNVumuLNMlhsTjXL4s=;
This is an updated version of what had originally been an
ext4-specific patch which significantly improves performance by lazily
writing timestamp updates (and in particular, mtime updates) to disk.
The in-memory timestamps are always correct, but they are only written
to disk when required for correctness.

This provides a huge performance boost for ext4 due to how it handles
journalling, but it's valuable for all file systems running on flash
storage or drive-managed SMR disks by reducing the metadata write
load.  So upon request, I've moved the functionality to the VFS layer.
Once the /sbin/mount program adds support for MS_LAZYTIME, all file
systems should be able to benefit from this optimization.

There is still an ext4-specific optimization, which may be applicable
for other file systems which store more than one inode in a block, but
it will require file system specific code.  It is purely optional,

Please note the changes to update_time() and the new write_time() inode
operations functions, which impact btrfs and xfs.  The changes are
fairly simple, but I would appreciate confirmation from the btrfs and
xfs teams that I got things right.   Thanks!!

Theodore Ts'o (4):
  fs: split update_time() into update_time() and write_time()
  vfs: add support for a lazytime mount option
  vfs: don't let the dirty time inodes get more than a day stale
  ext4: add support for a lazytime mount option

 fs/btrfs/inode.c        | 10 ++++++
 fs/ext4/inode.c         | 46 +++++++++++++++++++++++++-
 fs/ext4/super.c         |  9 +++++
 fs/fs-writeback.c       | 39 +++++++++++++++++++++-
 fs/inode.c              | 88 ++++++++++++++++++++++++++++++++++++++++++-------
 fs/proc_namespace.c     |  1 +
 fs/sync.c               |  7 ++++
 fs/xfs/xfs_iops.c       | 39 +++++++++-------------
 include/linux/fs.h      |  5 +++
 include/uapi/linux/fs.h |  1 +
 10 files changed, 209 insertions(+), 36 deletions(-)


<Prev in Thread] Current Thread [Next in Thread>