* + ratelimit-convert-flags-to-int-to-save-8-bytes-in-size.patch added to mm-nonmm-unstable branch
@ 2024-08-20 5:33 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2024-08-20 5:33 UTC (permalink / raw)
To: mm-commits, mjguzik, akpm
The patch titled
Subject: ratelimit: convert flags to int to save 8 bytes in size
has been added to the -mm mm-nonmm-unstable branch. Its filename is
ratelimit-convert-flags-to-int-to-save-8-bytes-in-size.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/ratelimit-convert-flags-to-int-to-save-8-bytes-in-size.patch
This patch will later appear in the mm-nonmm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: Mateusz Guzik <mjguzik@gmail.com>
Subject: ratelimit: convert flags to int to save 8 bytes in size
Date: Sat, 17 Aug 2024 14:37:54 +0200
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 <mjguzik@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
include/linux/ratelimit_types.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/include/linux/ratelimit_types.h~ratelimit-convert-flags-to-int-to-save-8-bytes-in-size
+++ a/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) { \
_
Patches currently in -mm which might be from mjguzik@gmail.com are
ratelimit-convert-flags-to-int-to-save-8-bytes-in-size.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-08-20 5:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-20 5:33 + ratelimit-convert-flags-to-int-to-save-8-bytes-in-size.patch added to mm-nonmm-unstable branch Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.