lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <170873667989.1860949.8776444464588431097.stgit@frogsfrogsfrogs>
Date: Fri, 23 Feb 2024 17:10:52 -0800
From: "Darrick J. Wong" <djwong@...nel.org>
To: akpm@...ux-foundation.org, daniel@...o.nz, kent.overstreet@...ux.dev,
 djwong@...nel.org
Cc: linux-xfs@...r.kernel.org, linux-bcachefs@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: [PATCH 03/10] time_stats: fix struct layout bloat

From: Darrick J. Wong <djwong@...nel.org>

Make these more efficient by getting rid of the holes.  This reduces the
structure size from 224 bytes to 208 bytes.

Signed-off-by: Darrick J. Wong <djwong@...nel.org>
Signed-off-by: Kent Overstreet <kent.overstreet@...ux.dev>
---
 include/linux/time_stats.h |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)


diff --git a/include/linux/time_stats.h b/include/linux/time_stats.h
index c05490101d197..1c1ba8efa7bfe 100644
--- a/include/linux/time_stats.h
+++ b/include/linux/time_stats.h
@@ -77,19 +77,19 @@ struct time_stats {
 	u64		last_event;
 	u64		last_event_start;
 
-/*
- * Is this really a struct time_stats_quantiled?  Hide this flag in the least
- * significant bit of the start time to avoid blowing up the structure size.
- */
-#define TIME_STATS_HAVE_QUANTILES	(1ULL << 0)
-
-	u64		start_time;
-
 	struct mean_and_variance	  duration_stats;
-	struct mean_and_variance_weighted duration_stats_weighted;
 	struct mean_and_variance	  freq_stats;
+	struct mean_and_variance_weighted duration_stats_weighted;
 	struct mean_and_variance_weighted freq_stats_weighted;
 	struct time_stat_buffer __percpu *buffer;
+
+/*
+ * Is this really a struct time_stats_quantiled?  Hide this flag in the least
+ * significant bit of the start time to avoid blowing up the structure size.
+ */
+#define TIME_STATS_HAVE_QUANTILES	(1ULL << 0)
+
+	u64		start_time;
 };
 
 struct time_stats_quantiles {


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ