[PATCH] trace: reorder perf_event_context to remove alignmentpadding on 64 bit builds

From: Richard Kennedy
Date: Mon Mar 07 2011 - 10:47:26 EST


Remove 8 bytes of alignment padding from perf_event_context on 64 bit
builds which shrinks its size to 192 bytes allowing it to fit into one
fewer cache lines and into a smaller slab.

Signed-off-by: Richard Kennedy <richard@xxxxxxxxxxxxxxx>
---
patch against v2.6.38-rc7
compiled and tested on x86_64

regards
Richard



diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index dda5b0a..59792fe 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -846,8 +846,8 @@ enum perf_event_context_type {
* Used as a container for task events and CPU events as well:
*/
struct perf_event_context {
- enum perf_event_context_type type;
struct pmu *pmu;
+ enum perf_event_context_type type;
/*
* Protect the states of the events in the list,
* nr_active, and the list:


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/