summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorSergey Senozhatsky <senozhatsky@chromium.org>2025-12-15 08:47:11 +0300
committerAndrew Morton <akpm@linux-foundation.org>2026-01-21 06:24:38 +0300
commit2e8ff2f51dde73a26b94aed2df4827177bd25e6e (patch)
tree91e6aa284095f3088d1e8290132618b2c8d295fe /include/linux
parent0327a862135b0b0b5e67f1434468326b733562bf (diff)
downloadlinux-2e8ff2f51dde73a26b94aed2df4827177bd25e6e.tar.xz
zram: use u32 for entry ac_time tracking
We can reduce sizeof(zram_table_entry) on 64-bit systems by converting flags and ac_time to u32. Entry flags fit into u32, and for ac_time u32 gives us over a century of entry lifespan (approx 136 years) which is plenty (zram uses system boot time (seconds)). In struct zram_table_entry we use bytes aliasing, because bit-wait API (for slot lock) requires a whole unsigned long word. Link: https://lkml.kernel.org/r/d7c0b48450c70eeb5fd8acd6ecd23593f30dbf1f.1765775954.git.senozhatsky@chromium.org Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org> Suggested-by: David Stevens <stevensd@google.com> Cc: Brian Geffon <bgeffon@google.com> Cc: Minchan Kim <minchan@google.com> Cc: Richard Chang <richardycc@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions