Received: by 10.223.176.5 with SMTP id f5csp2810109wra; Mon, 29 Jan 2018 04:27:35 -0800 (PST) X-Google-Smtp-Source: AH8x224QGQiU7WPVstm32eKbddYbp7Gu2e0aTqPnLV0VJEfQYQkV8TMsTi2kaayfPLe1JNEbBXSp X-Received: by 10.98.89.198 with SMTP id k67mr26881582pfj.110.1517228855671; Mon, 29 Jan 2018 04:27:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517228855; cv=none; d=google.com; s=arc-20160816; b=gWYdztl7UYU4w2g/HIasz5W04LU7kAVXZERU4fos2QwENlCsVUvYe8eq3XKzFPEfDl ZLE5oSQ/Rr1jKzZdROPD030qS+/B1di6SEWQzovkjyfrMo5WElIoMRWOyAEkEOq79kyq CrpqIbMZjcooatbaRZK4HOuaG/c03UKytbl2rtFwdC9Qhxn2K6Krdzl+KodLBgfglJk5 Btpvq1P4BO+Oy6w+1cl4x86dtwCSRzVJWmWPTgkEnovChfiV/UnP9U61hD0cLmISRpe/ Ny7i6F4D7z6bP49d34OvL+xiq00OeHFLGWA7hcn2cQnmibLc3kbQzDAkt5jvMT1SkiBA Y1SQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :date:cc:to:from:subject:message-id:arc-authentication-results; bh=RuM4V96RbBxI2DW8pTm3gK9yr6I/sxa/L4HfUks0LSc=; b=PArSMDTgVivMf9S/+q8iVTnKEyo7vjoPddaqn3C4NQrD5zDqkQ0jusXV+NNVv+Jetl kktfQnCjxR83ytfA1yHGnYrH9x5rOgRUbsKqX7ZuJT6jfRBYMaY29jN/MZSvp/KAT4nv g0mk6RsdlOXpxCSySH9Z+0rcZ78AyWgNgd71Rk3TWLrg+fQlgWGf7nOXxu1l/PwD/bVA QybgKb9xqyBr6iP15TIU25KWSe2d0STaeXG/OvpLmEKVsuVkj6dOXEPw/2eN6MHumc8n z2QEt6E5E757sfVM1VzmZhdARK+9rDBxW1oHfjbKOV5n2QBXrULZrNbc6dJkG6RP3oIl yYhQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 61-v6si9270290plb.203.2018.01.29.04.27.21; Mon, 29 Jan 2018 04:27:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751903AbeA2M0p (ORCPT + 99 others); Mon, 29 Jan 2018 07:26:45 -0500 Received: from mail-qk0-f194.google.com ([209.85.220.194]:43681 "EHLO mail-qk0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751881AbeA2M0j (ORCPT ); Mon, 29 Jan 2018 07:26:39 -0500 Received: by mail-qk0-f194.google.com with SMTP id a5so5221406qkg.10 for ; Mon, 29 Jan 2018 04:26:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:mime-version :content-transfer-encoding; bh=RuM4V96RbBxI2DW8pTm3gK9yr6I/sxa/L4HfUks0LSc=; b=HNYmykcXeALspZGVE61plEtW/MSzBqtMN7MQ9dp2jOeUJTJ9oDzZRdQx8EwYpr8PdS 0Ax0y49a7HSdNfacYRXKhQAAc5eDQltXuCPhm1O1JsPrTM07csr7k3Gioibi/Qk7p+Ss sC2sZJ2mrEi5q6WsXQ5j3rBMWx2VFa23UMrNOUgEsje3tXUv6LIERAv6/MvVZSI0Ecm7 vFrToB3Wy5MWrMR5UPhSk9SEh2kaz9EYfhcIbUYQWVhmf7XXt2yqhC99V1l6fNkRe7sv WdgvqyXcZZUgeVdxwolIblFL8zkNWWoAoQnTVOaG7vtVKfpOMDYG4CSVrAHBaNFTNx1n h3gg== X-Gm-Message-State: AKwxytdWa4/1BZjeXdeSVvGGcIPpjd73fwQwreFJTr1raydCiWd+CR8B pGj6EISbBahNtuiWFM5u1eL/zw== X-Received: by 10.55.189.7 with SMTP id n7mr35793448qkf.50.1517228797851; Mon, 29 Jan 2018 04:26:37 -0800 (PST) Received: from tleilax.poochiereds.net (cpe-71-70-156-158.nc.res.rr.com. [71.70.156.158]) by smtp.gmail.com with ESMTPSA id d201sm7284907qke.69.2018.01.29.04.26.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 29 Jan 2018 04:26:37 -0800 (PST) Message-ID: <1517228795.5965.24.camel@redhat.com> Subject: [GIT PULL] inode->i_version rework for v4.16 From: Jeff Layton To: Linus Torvalds Cc: open list , "" , Al Viro , xfs , "open list:NFS, SUNRPC, AND..." , linux-btrfs , linux-integrity , Andrew Morton , "linux-ext4@vger.kernel.org" Date: Mon, 29 Jan 2018 07:26:35 -0500 Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.4 (3.26.4-1.fc27) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following changes since commit 50c4c4e268a2d7a3e58ebb698ac74da0de40ae36: Linux 4.15-rc3 (2017-12-10 17:56:26 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git tags/iversion-v4.16-1 for you to fetch changes up to f02a9ad1f15daf4378afeda025a53455f72645dd: fs: handle inode->i_version more efficiently (2018-01-29 06:42:21 -0500) ---------------------------------------------------------------- Hi Linus, This pile of patches is a rework of the inode->i_version field. We have traditionally incremented that field on every inode data or metadata change. Typically this increment needs to be logged on disk even when nothing else has changed, which is rather expensive. It turns out though that none of the consumers of that field actually require this behavior. The only real requirement for all of them is that it be different iff the inode has changed since the last time the field was checked. Given that, we can optimize away most of the i_version increments and avoid dirtying inode metadata when the only change is to the i_version and no one is querying it. Queries of the i_version field are rather rare, so we can help write performance under many common workloads. This patch series converts existing accesses of the i_version field to a new API, and then converts all of the in-kernel filesystems to use it. The last patch in the series then converts the backend implementation to a scheme that optimizes away a large portion of the metadata updates when no one is looking at it. In my own testing this series significantly helps performance with small I/O sizes. I also got this email for Christmas this year from the kernel test robot (a 244% r/w bandwidth improvement with XFS over DAX, with 4k writes): https://lkml.org/lkml/2017/12/25/8 A few of the earlier patches in this pile are also flowing to you via other trees (mm, integrity, and nfsd trees in particular), so there may be some minor merge conflicts here. Hopefully they're trivial to resolve, but let me know if there are problems. Thanks! ---------------------------------------------------------------- Jeff Layton (21): lustre: don't set f_version in ll_readdir ntfs: remove i_version handling fs: new API for handling inode->i_version fs: don't take the i_lock in inode_inc_iversion fat: convert to new i_version API affs: convert to new i_version API afs: convert to new i_version API btrfs: convert to new i_version API exofs: switch to new i_version API ext2: convert to new i_version API ext4: convert to new i_version API nfs: convert to new i_version API nfsd: convert to new i_version API ocfs2: convert to new i_version API ufs: use new i_version API xfs: convert to new i_version API IMA: switch IMA over to new i_version API fs: only set S_VERSION when updating times if necessary xfs: avoid setting XFS_ILOG_CORE if i_version doesn't need incrementing btrfs: only dirty the inode in btrfs_update_time if something was changed fs: handle inode->i_version more efficiently Sascha Hauer (1): ima: Use i_version only when filesystem supports it drivers/staging/lustre/lustre/llite/dir.c | 3 - fs/affs/amigaffs.c | 5 +- fs/affs/dir.c | 5 +- fs/affs/super.c | 3 +- fs/afs/fsclient.c | 3 +- fs/afs/inode.c | 5 +- fs/btrfs/delayed-inode.c | 7 +- fs/btrfs/file.c | 1 + fs/btrfs/inode.c | 12 +- fs/btrfs/ioctl.c | 1 + fs/btrfs/tree-log.c | 4 +- fs/btrfs/xattr.c | 1 + fs/exofs/dir.c | 9 +- fs/exofs/super.c | 3 +- fs/ext2/dir.c | 9 +- fs/ext2/super.c | 5 +- fs/ext4/dir.c | 9 +- fs/ext4/inline.c | 7 +- fs/ext4/inode.c | 13 +- fs/ext4/ioctl.c | 3 +- fs/ext4/namei.c | 5 +- fs/ext4/super.c | 3 +- fs/ext4/xattr.c | 5 +- fs/fat/dir.c | 3 +- fs/fat/inode.c | 9 +- fs/fat/namei_msdos.c | 7 +- fs/fat/namei_vfat.c | 22 +- fs/inode.c | 11 +- fs/nfs/delegation.c | 3 +- fs/nfs/fscache-index.c | 5 +- fs/nfs/inode.c | 18 +- fs/nfs/nfs4proc.c | 10 +- fs/nfs/nfstrace.h | 5 +- fs/nfs/write.c | 8 +- fs/nfsd/nfsfh.h | 3 +- fs/ntfs/inode.c | 9 - fs/ntfs/mft.c | 6 - fs/ocfs2/dir.c | 15 +- fs/ocfs2/inode.c | 3 +- fs/ocfs2/namei.c | 3 +- fs/ocfs2/quota_global.c | 3 +- fs/ufs/dir.c | 9 +- fs/ufs/inode.c | 3 +- fs/ufs/super.c | 3 +- fs/xfs/libxfs/xfs_inode_buf.c | 7 +- fs/xfs/xfs_icache.c | 5 +- fs/xfs/xfs_inode.c | 3 +- fs/xfs/xfs_inode_item.c | 3 +- fs/xfs/xfs_trans_inode.c | 16 +- include/linux/fs.h | 17 +- include/linux/iversion.h | 341 ++++++++++++++++++++++++++++++ security/integrity/ima/ima_api.c | 3 +- security/integrity/ima/ima_main.c | 4 +- 53 files changed, 525 insertions(+), 153 deletions(-) create mode 100644 include/linux/iversion.h -- Jeff Layton