From: Mateusz Guzik Date: Sat, 17 Aug 2024 12:37:54 +0000 (+0200) Subject: ratelimit: convert flags to int to save 8 bytes in size X-Git-Tag: v6.12-rc1~114^2~37 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d994c238347d7ba4de15da00985e1bea75e91dc7;p=thirdparty%2Fkernel%2Flinux.git ratelimit: convert flags to int to save 8 bytes in size Only bit 1 is used, making an unsigned long a total overkill. This brings it from 40 to 32 bytes, which in turn shrinks user_struct from 136 to 128 bytes. Since the latter is allocated with hwalign, this means the total usage goes down from 192 to 128 bytes per object. No functional changes. Link: https://lkml.kernel.org/r/20240817123754.240924-1-mjguzik@gmail.com Signed-off-by: Mateusz Guzik Signed-off-by: Andrew Morton --- diff --git a/include/linux/ratelimit_types.h b/include/linux/ratelimit_types.h index 002266693e506..765232ce0b5e9 100644 --- a/include/linux/ratelimit_types.h +++ b/include/linux/ratelimit_types.h @@ -19,8 +19,8 @@ struct ratelimit_state { int burst; int printed; int missed; + unsigned int flags; unsigned long begin; - unsigned long flags; }; #define RATELIMIT_STATE_INIT_FLAGS(name, interval_init, burst_init, flags_init) { \