All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@elte.hu>, LKML <linux-kernel@vger.kernel.org>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Paul Mackerras <paulus@samba.org>,
	David Miller <davem@davemloft.net>,
	Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [PATCH 1/2] perf: Correctly align perf event tracing buffer
Date: Mon, 29 Mar 2010 19:16:18 +0200	[thread overview]
Message-ID: <20100329171615.GA5101@nowhere> (raw)
In-Reply-To: <1269852691.12097.162.camel@laptop>

On Mon, Mar 29, 2010 at 10:51:31AM +0200, Peter Zijlstra wrote:
> On Sun, 2010-03-28 at 07:11 +0200, Frederic Weisbecker wrote:
> >  kernel/trace/trace_event_perf.c |   11 +++++++++--
> >  1 files changed, 9 insertions(+), 2 deletions(-)
> > 
> > diff --git a/kernel/trace/trace_event_perf.c b/kernel/trace/trace_event_perf.c
> > index 0709e4f..69941f3 100644
> > --- a/kernel/trace/trace_event_perf.c
> > +++ b/kernel/trace/trace_event_perf.c
> > @@ -15,7 +15,12 @@ EXPORT_PER_CPU_SYMBOL_GPL(perf_trace_regs);
> >  static char *perf_trace_buf;
> >  static char *perf_trace_buf_nmi;
> >  
> > -typedef typeof(char [PERF_MAX_TRACE_SIZE]) perf_trace_t ;
> > +/*
> > + * Force it to be aligned to unsigned long to avoid misaligned accesses
> > + * suprises
> > + */
> > +typedef typeof(unsigned long [PERF_MAX_TRACE_SIZE / sizeof(unsigned long)])
> > +	perf_trace_t;
> >  
> 
> wouldn't __aligned(8) be simpler?


David and Tejun seemed to prefer to create the alignment on the
type level rather than using an align.

I'm personally fine either way.


  reply	other threads:[~2010-03-29 17:16 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-28  5:11 [GIT PULL] perf fixes Frederic Weisbecker
2010-03-28  5:11 ` [PATCH 1/2] perf: Correctly align perf event tracing buffer Frederic Weisbecker
2010-03-29  8:51   ` Peter Zijlstra
2010-03-29 17:16     ` Frederic Weisbecker [this message]
2010-03-29 17:20       ` Peter Zijlstra
2010-03-29 17:51         ` Frederic Weisbecker
2010-03-28  5:11 ` [PATCH 2/2] perf: Use hot regs with software sched switch/migrate events Frederic Weisbecker
2010-03-29  8:49   ` Peter Zijlstra
2010-03-29 17:47     ` Frederic Weisbecker
2010-03-29 18:05       ` Peter Zijlstra
2010-03-29 22:43         ` Frederic Weisbecker
2010-03-29 22:53           ` Frederic Weisbecker
2010-03-30 18:54           ` Peter Zijlstra
2010-03-30 19:14             ` Frederic Weisbecker
2010-03-29  3:33 ` [GIT PULL] perf fixes Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100329171615.GA5101@nowhere \
    --to=fweisbec@gmail.com \
    --cc=acme@redhat.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.