From patchwork Wed Oct 4 18:55:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 13409305 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id E3D42E7C4ED for ; Wed, 4 Oct 2023 18:56:23 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 834078D00AC; Wed, 4 Oct 2023 14:56:23 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7BD338D0002; Wed, 4 Oct 2023 14:56:23 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5746F8D00AC; Wed, 4 Oct 2023 14:56:23 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 41FC28D0002 for ; Wed, 4 Oct 2023 14:56:23 -0400 (EDT) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 0F41380414 for ; Wed, 4 Oct 2023 18:56:23 +0000 (UTC) X-FDA: 81308684646.26.0F2B074 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf03.hostedemail.com (Postfix) with ESMTP id B9FC420020 for ; Wed, 4 Oct 2023 18:56:20 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=NqVtdmXP; spf=pass (imf03.hostedemail.com: domain of jlayton@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=jlayton@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1696445781; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=bas1HH1yNprEzYlUdRGZTq3Olr7EjY5TS7D6MU0JW7o=; b=MKAitvTCVPja+4T0XW3jjx4RKUmKUve37CHmEpAEPF6/QmfHYqwYQfooU5XOkUbWreI6VJ PjW2i6XWVgr4VVqBoCfJ3KFcIXWqXYHuIMz015+sH+T5AkqwpiruqBA9c+UekvRzmmgZ1k 95hyWchX7suMYVRhM5SBiAQwqco+fTg= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1696445781; a=rsa-sha256; cv=none; b=IyI+HZFg4S4D3IbyFgtsylubWR9MOqX3oAlYH8j6H5fzR12j9iut9zgpHykL1AK8C2SmMi 2b/3qIICdX1qKUnJXeOUJHbMI2Dk7MlgZ9SAcW0/CLDCAjO8o9cmeGI5qh5Kn+iKbkkfBu dURwFKJXQ8C65sAYB2Ej/XKZ+Vn1D10= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=NqVtdmXP; spf=pass (imf03.hostedemail.com: domain of jlayton@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=jlayton@kernel.org; dmarc=pass (policy=none) header.from=kernel.org Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id E28BDCE1E77; Wed, 4 Oct 2023 18:56:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 675C9C433D9; Wed, 4 Oct 2023 18:56:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696445777; bh=iC7KwsOJJL3kT0M8KubHc+xTYSGXLa7gjxgf1YgvBK8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NqVtdmXPTE3K9q9deuJTm/G7a71zUKszCFqZsp5GIQNtA7H7/+QIS49PlOMCUfFNJ 1ydyxG0x0Zhc5NXKKvQZoNb0pMC2bwR6porAQ3qOkvHn+oCaXipMdg5DIlUK6kK3dJ /qGaNm9SdmE2IDbECVrjFagXBbmQuihBc1Xhxlya1LZKKRDWQwFqYqNeRTG4/PcP8U fjxjbvBWhJKav9Mn2S5Lw52vmEkf02EL+EOCc8xxck+JdDNrgRWXBSojP+3KV6r6+j osY5RvD+bQgIMRf1FSVwxbtgizfCN1brIMaKXTHpZ/pGKsilyXHn7K+ZkEvj2U6B0B tzn7voxPB+lnw== From: Jeff Layton To: Alexander Viro , Christian Brauner , Linus Torvalds , David Sterba , Amir Goldstein , Theodore Ts'o , Eric Biederman , Kees Cook , Jeremy Kerr , Arnd Bergmann , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Greg Kroah-Hartman , =?utf-8?q?Arve_Hj=C3=B8nne?= =?utf-8?q?v=C3=A5g?= , Todd Kjos , Martijn Coenen , Joel Fernandes , Carlos Llamas , Suren Baghdasaryan , Mattia Dongili , Dennis Dalessandro , Jason Gunthorpe , Leon Romanovsky , Brad Warrum , Ritu Agarwal , Hans de Goede , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , Mark Gross , Jiri Slaby , Eric Van Hensbergen , Latchesar Ionkov , Dominique Martinet , Christian Schoenebeck , David Sterba , David Howells , Marc Dionne , Ian Kent , Luis de Bethencourt , Salah Triki , "Tigran A. Aivazian" , Chris Mason , Josef Bacik , Xiubo Li , Ilya Dryomov , Jan Harkes , coda@cs.cmu.edu, Joel Becker , Christoph Hellwig , Nicolas Pitre , "Rafael J. Wysocki" , Ard Biesheuvel , Gao Xiang , Chao Yu , Yue Hu , Jeffle Xu , Namjae Jeon , Sungjong Seo , Jan Kara , Andreas Dilger , Jaegeuk Kim , OGAWA Hirofumi , Christoph Hellwig , Miklos Szeredi , Bob Peterson , Andreas Gruenbacher , Richard Weinberger , Anton Ivanov , Johannes Berg , Mikulas Patocka , Mike Kravetz , Muchun Song , Jan Kara , David Woodhouse , Dave Kleikamp , Tejun Heo , Trond Myklebust , Anna Schumaker , Chuck Lever , Neil Brown , Olga Kornievskaia , Dai Ngo , Tom Talpey , Ryusuke Konishi , Anton Altaparmakov , Konstantin Komarov , Mark Fasheh , Joseph Qi , Bob Copeland , Mike Marshall , Martin Brandenburg , Luis Chamberlain , Iurii Zaikin , Tony Luck , "Guilherme G. Piccoli" , Anders Larsen , Steve French , Paulo Alcantara , Ronnie Sahlberg , Shyam Prasad N , Sergey Senozhatsky , Phillip Lougher , Steven Rostedt , Masami Hiramatsu , Evgeniy Dushistov , Chandan Babu R , "Darrick J. Wong" , Damien Le Moal , Naohiro Aota , Johannes Thumshirn , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Hugh Dickins , Andrew Morton , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , John Johansen , Paul Moore , James Morris , "Serge E. Hallyn" , Stephen Smalley , Eric Paris , Kent Overstreet , Brian Foster Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-rdma@vger.kernel.org, linux-serial@vger.kernel.org, linux-usb@vger.kernel.org, v9fs@lists.linux.dev, linux-afs@lists.infradead.org, autofs@vger.kernel.org, linux-btrfs@vger.kernel.org, ceph-devel@vger.kernel.org, codalist@coda.cs.cmu.edu, linux-efi@vger.kernel.org, linux-erofs@lists.ozlabs.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, gfs2@lists.linux.dev, linux-um@lists.infradead.org, linux-mtd@lists.infradead.org, jfs-discussion@lists.sourceforge.net, linux-nfs@vger.kernel.org, linux-nilfs@vger.kernel.org, linux-ntfs-dev@lists.sourceforge.net, ntfs3@lists.linux.dev, ocfs2-devel@lists.linux.dev, linux-karma-devel@lists.sourceforge.net, devel@lists.orangefs.org, linux-unionfs@vger.kernel.org, linux-hardening@vger.kernel.org, reiserfs-devel@vger.kernel.org, linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, linux-trace-kernel@vger.kernel.org, linux-xfs@vger.kernel.org, bpf@vger.kernel.org, netdev@vger.kernel.org, apparmor@lists.ubuntu.com, linux-security-module@vger.kernel.org, selinux@vger.kernel.org, linux-bcachefs@vger.kernel.org Subject: [PATCH v2 89/89] fs: move i_generation into new hole created after timestamp conversion Date: Wed, 4 Oct 2023 14:55:30 -0400 Message-ID: <20231004185530.82088-3-jlayton@kernel.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231004185530.82088-1-jlayton@kernel.org> References: <20231004185530.82088-1-jlayton@kernel.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: B9FC420020 X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: hxc4xmanrba31t8iwsfm1zyn3k44rdy4 X-HE-Tag: 1696445780-692126 X-HE-Meta: U2FsdGVkX18ZPJaot6sZaLpwhHMWK4GMkw5GecGYyk00+Aw4UyBuLDxey+rEXtyhC4LNn9DtqOHK6MqHUopj0VJbtJbHmRyq36/Ww1vl/AhdMp7OCOksgbiwdLMxnMtytjk83bBA/Dmto9JbYbNk0p0oVu2xCDtxZXk8aMAyYMufnkt+dgR1Z8VQMqQhwoc5hLwo9aCCP/LLlmaaPT6z+OJkC6CQAt24T4EINhwIGYxBhMcTZ1BgW1j+UD/5cjRuLiHZ+LJkWWEOCRX2VLRkW2e4tR5F2mL8C3ijjG2ZOCw+64YlN2U74s94QXwOx15Lt9VbXMqQYNtIYHF1NxFBoxkgq/FNX9LZfKUL6+9r9rtivngXu2svSivj7cAd4lxThi8ZLvz6Ef0c/IlSsV0/o/SpspMeG91mgLWjD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WWp7YbsCAxCGsiEog9neWuHLMJnBf7UD8P3IjkpeSV1nNSZRDqwKlsVZ1xSdzAlXZkw0lzuGu1scXhKzeK8IINHxTucnD/oz2uupdq55mf8eYm+aHUJRUczLm9lQ+I2iinQaxnva49s12oA6uStQkZ4OYBD422MOseUyQSHrMM3Ma1YI2j7e2W4RWOuZx36TQo2JtL7BCHN0L+KSaTawiVx/KTDvafwm3q2PcXImZnrqV8x3BeQJSMw6HVnzj20NYs/vaJrZ2tj4oUe9qqJMxUwrqLyZMX6tionBxNjqqy1S4mVD6cndl GniqA1DT z0HYdGqmvZHoSlU2uP+UN7g+rVL1Jb9S1RCQKxK10lpV3y1+WjdPgfewUZ3R9cygIOta3MVs+HPFYkGi/jM9wUWcPpDfEdmF9Omma53y25yRw+AyiNwry6w0ZTiO82XwYawWz7qYCfJ+6PebwIyy36ZzKSSGJ4fvRszpCupFYU5gkUgWehrn8X6ueyZ5aP0Lt+r6rlfs54yNOVjATHbVpC1nLYFbiFxiDYglj1nGT5OdrIY35yOacdhfdKNvY7GFNEG0dSYqLSWQXuG6WYS4MBsYPLKd02dIdHdMVeQTKfHbcRIDfdIf3ouG8U0YinoHxSSp7MKoOzuXh9Dyro/1dleRLkYdIPMVe8UCs3p86b/iap1CnB+mIZRunbZ1PCcwqQ/OB9TKm596YlUa6EFIkfDeqFjgVW1vR+6SE5I+HbMA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: The recent change to use discrete integers instead of struct timespec64 shaved 8 bytes off of struct inode, but it also moves the i_lock into the previous cacheline, away from the fields that it protects. Move i_generation above the i_lock, which moves the new 4 byte hole to just after the i_fsnotify_mask in my setup. Suggested-by: Amir Goldstein Signed-off-by: Jeff Layton --- include/linux/fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/fs.h b/include/linux/fs.h index 485b5e21c8e5..686c9f33e725 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -677,6 +677,7 @@ struct inode { u32 i_atime_nsec; u32 i_mtime_nsec; u32 i_ctime_nsec; + u32 i_generation; spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_size */ unsigned short i_bytes; u8 i_blkbits; @@ -733,7 +734,6 @@ struct inode { unsigned i_dir_seq; }; - __u32 i_generation; #ifdef CONFIG_FSNOTIFY __u32 i_fsnotify_mask; /* all events this inode cares about */