mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] perf events: remove 64bit alignment padding from perf_event_context
@ 2011-06-07 15:33 Richard Kennedy
  2011-06-07 15:39 ` Peter Zijlstra
  2011-07-01 15:19 ` [tip:perf/core] perf: Remove 64-bit " tip-bot for Richard Kennedy
  0 siblings, 2 replies; 3+ messages in thread
From: Richard Kennedy @ 2011-06-07 15:33 UTC (permalink / raw)
  To: Peter Zijlstra; +Cc: Paul Mackerras, Ingo Molnar, lkml

Reorder perf_event_context to remove 8 bytes of 64 bit alignment padding
shrinking its size to 192 bytes, allowing it to fit into a smaller slab
and use one fewer cache lines.


Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>

---

patch against v3.0-rc2
compiled & tested on x86_64

regards
Richard


diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index 3412684..9d5b3d5 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -919,8 +919,8 @@ struct perf_event_context {
 	u64				parent_gen;
 	u64				generation;
 	int				pin_count;
-	struct rcu_head			rcu_head;
 	int				nr_cgroups; /* cgroup events present */
+	struct rcu_head			rcu_head;
 };
 
 /*



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] perf events: remove 64bit alignment padding from perf_event_context
  2011-06-07 15:33 [PATCH] perf events: remove 64bit alignment padding from perf_event_context Richard Kennedy
@ 2011-06-07 15:39 ` Peter Zijlstra
  2011-07-01 15:19 ` [tip:perf/core] perf: Remove 64-bit " tip-bot for Richard Kennedy
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Zijlstra @ 2011-06-07 15:39 UTC (permalink / raw)
  To: Richard Kennedy; +Cc: Paul Mackerras, Ingo Molnar, lkml

On Tue, 2011-06-07 at 16:33 +0100, Richard Kennedy wrote:
> Reorder perf_event_context to remove 8 bytes of 64 bit alignment padding
> shrinking its size to 192 bytes, allowing it to fit into a smaller slab
> and use one fewer cache lines.
> 
> 
> Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>

Nice, thanks!

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tip:perf/core] perf: Remove 64-bit alignment padding from perf_event_context
  2011-06-07 15:33 [PATCH] perf events: remove 64bit alignment padding from perf_event_context Richard Kennedy
  2011-06-07 15:39 ` Peter Zijlstra
@ 2011-07-01 15:19 ` tip-bot for Richard Kennedy
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Richard Kennedy @ 2011-07-01 15:19 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, a.p.zijlstra, richard, tglx, mingo

Commit-ID:  28009ce4a8130af7260a9271901b4419834ad152
Gitweb:     http://git.kernel.org/tip/28009ce4a8130af7260a9271901b4419834ad152
Author:     Richard Kennedy <richard@rsk.demon.co.uk>
AuthorDate: Tue, 7 Jun 2011 16:33:38 +0100
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Fri, 1 Jul 2011 11:06:32 +0200

perf: Remove 64-bit alignment padding from perf_event_context

Reorder perf_event_context to remove 8 bytes of 64 bit alignment padding
shrinking its size to 192 bytes, allowing it to fit into a smaller slab
and use one fewer cache lines.

Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1307460819.1950.5.camel@castor.rsk
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 include/linux/perf_event.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index e76a410..2f7b5d4 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -894,8 +894,8 @@ struct perf_event_context {
 	u64				parent_gen;
 	u64				generation;
 	int				pin_count;
-	struct rcu_head			rcu_head;
 	int				nr_cgroups; /* cgroup events present */
+	struct rcu_head			rcu_head;
 };
 
 /*

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-07-01 15:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-07 15:33 [PATCH] perf events: remove 64bit alignment padding from perf_event_context Richard Kennedy
2011-06-07 15:39 ` Peter Zijlstra
2011-07-01 15:19 ` [tip:perf/core] perf: Remove 64-bit " tip-bot for Richard Kennedy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome