Skip to content

Commit

Permalink
perf: Reorder & optimize perf_event_context to remove alignment paddi…
Browse files Browse the repository at this point in the history
…ng on 64 bit builds

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@rsk.demon.co.uk>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1299512819.2039.5.camel@castor.rsk>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Richard Kennedy authored and Ingo Molnar committed Mar 16, 2011
1 parent a0f7d0f commit ee643c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/perf_event.h
Original file line number Diff line number Diff line change
Expand Up @@ -878,8 +878,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:
Expand Down

0 comments on commit ee643c4

Please sign in to comment.