Re: [PATCH] fs: pack fields `i_state` and `i_fsnotify_mask`
From: Max Kellermann
Date: Fri Nov 13 2026 - 03:31:41 EST
On Thu, Nov 12, 2026 at 7:38 PM Jan Kara <jack@xxxxxxx> wrote:
> When moving i_fsnotify_mask please move it along with i_fsnotify_marks. It
> should better be in the same cacheline because these two are accessed on
> some performance sensitive paths.
Tried that, but:
struct inode_state_flags i_state; /* 120 4 */
__u32 i_fsnotify_mask; /* 124 4 */
/* --- cacheline 2 boundary (128 bytes) --- */
struct fsnotify_mark_connector * i_fsnotify_marks; /* 128 8 */
The cacheline happened to end after "i_state" (and now
"i_fsnotify_mask"). I could move "i_state" down instead, or move other
fields around - but you're a better expert here, please advise what
you believe is best.
--
Max Kellermann
Principal Architect
Hosting Technology
cm4all | Im Mediapark 6a | 50670 Köln | Germany
General information about the company can be found here:
https://www.cm4all.com/impressum
A member of the IONOS Group