ratelimit: convert flags to int to save 8 bytes in size
PATCH 1/1 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 64 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.
---
./scripts/get_maintainer.pl --git was most unhelpful showing nothing
I have no idea who to prod about it, I think it is pretty trivial not needing any discussion.
Andrew Morton pulled in some of the changes to the file, so that's my primary recipient.
include/linux/ratelimit_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/ratelimit_types.h +1 -1
@@ -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) { \
Signature · 1 line
2.43.0
Quoted 3 lines · Mateusz Guzik
Only bit 1 is used, making an unsigned long a total overkill.
This brings it from 64 to 32 bytes, which in turn shrinks
user_struct
sigh, 40 to 32 bytes of course
this is embedded into user_struct, avoidably pushing it past 128 bytes of size
Quoted 37 lines
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.
Signed-off-by Mateusz Guzik <[email protected]>---
./scripts/get_maintainer.pl--git was most unhelpful showing nothingI have no idea who to prod about it, I think it is pretty trivial not needing any discussion.
Andrew Morton pulled in some of the changes to the file, so that's my primary recipient.
include/linux/ratelimit_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/linux/ratelimit_types.h +1
-1@@ -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) { \Signature · 1 line
2.43.0