linux/drivers/block/zram
Sebastian Andrzej Siewior 68d20eb60e zram: Shrink zram_table_entry::flags.
The zram_table_entry::flags member is of type long and uses 8 bytes on a
64bit architecture. With a PAGE_SIZE of 256KiB we have PAGE_SHIFT of 18
which in turn leads to __NR_ZRAM_PAGEFLAGS = 27. This still fits in an
ordinary integer.
By reducing the size of `flags' to four bytes, the size of the struct
goes back to 16 bytes. The padding between the lock and ac_time (if
enabled) is also gone.

Make zram_table_entry::flags an unsigned int and update the build test
to reflect the change.

Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Reviewed-by: Jens Axboe <axboe@kernel.dk>
Link: https://lore.kernel.org/r/20240906141520.730009-4-bigeasy@linutronix.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-09-06 08:51:08 -06:00
..
Kconfig mm/zsmalloc: use a proper page type 2024-07-03 19:30:16 -07:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
zcomp.c zram: do not allocate physically contiguous strm buffers 2024-02-22 10:24:59 -08:00
zcomp.h zram: zcomp: remove zcomp_set_max_streams() declaration 2024-03-04 17:01:17 -08:00
zram_drv.c zram: Shrink zram_table_entry::flags. 2024-09-06 08:51:08 -06:00
zram_drv.h zram: Shrink zram_table_entry::flags. 2024-09-06 08:51:08 -06:00