Skip to content

Commit 2c082b8

Browse files
MaxKellermannopsiff
authored andcommitted
pipe: reduce padding in struct pipe_inode_info
mainline inclusion from mainline-v6.7-rc1 category: performance This has no effect on 64 bit because there are 10 32-bit integers surrounding the two bools, but on 32 bit architectures, this reduces the struct size by 4 bytes by merging the two bools into one word. Signed-off-by: Max Kellermann <max.kellermann@ionos.com> Message-Id: <20230921075755.1378787-1-max.kellermann@ionos.com> Signed-off-by: Christian Brauner <brauner@kernel.org> (cherry picked from commit 61105aa) Signed-off-by: Wentao Guan <guanwentao@uniontech.com> Change-Id: I3bd93024632f840bbcee33cf88dd7433e782db1a
1 parent b49f977 commit 2c082b8

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

include/linux/pipe_fs_i.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,16 +62,16 @@ struct pipe_inode_info {
6262
unsigned int tail;
6363
unsigned int max_usage;
6464
unsigned int ring_size;
65-
#ifdef CONFIG_WATCH_QUEUE
66-
bool note_loss;
67-
#endif
6865
unsigned int nr_accounted;
6966
unsigned int readers;
7067
unsigned int writers;
7168
unsigned int files;
7269
unsigned int r_counter;
7370
unsigned int w_counter;
7471
bool poll_usage;
72+
#ifdef CONFIG_WATCH_QUEUE
73+
bool note_loss;
74+
#endif
7575
struct page *tmp_page;
7676
struct fasync_struct *fasync_readers;
7777
struct fasync_struct *fasync_writers;

0 commit comments

Comments
 (0)