[03/10] time_stats: fix struct layout bloat
Commit Message
From: Darrick J. Wong <djwong@kernel.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@kernel.org>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
---
include/linux/time_stats.h | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
@@ -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 {