From: olof@lixom.net (Olof Johansson)
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: linuxppc-dev@ozlabs.org, paulus@samba.org, anton@samba.org
Subject: Re: [PATCH] [v2] powerpc: save trap number in bad_stack
Date: Mon, 23 Apr 2007 08:54:30 -0500 [thread overview]
Message-ID: <20070423135430.GA1805@lixom.net> (raw)
In-Reply-To: <20070423232217.08e420a6.sfr@canb.auug.org.au>
On Mon, Apr 23, 2007 at 11:22:17PM +1000, Stephen Rothwell wrote:
> On Sun, 22 Apr 2007 18:38:21 -0500 olof@lixom.net (Olof Johansson) wrote:
> >
> > --- powerpc.orig/include/asm-powerpc/paca.h
> > +++ powerpc/include/asm-powerpc/paca.h
> > @@ -68,6 +68,7 @@ struct paca_struct {
> > void *emergency_sp; /* pointer to emergency stack */
> > u64 data_offset; /* per cpu data offset */
> > s16 hw_cpu_id; /* Physical processor number */
> > + u16 trap_save; /* Used when bad stack is encountered */
>
> Please read the comment at the top of the struct:
>
> /*
> * Because hw_cpu_id, unlike other paca fields, is accessed
> * routinely from other CPUs (from the IRQ code), we stick to
> * read-only (after boot) fields in the first cacheline to
> * avoid cacheline bouncing.
> */
>
> So please move this out of the first cache line.
Never thought I'd say this: Too many comments! I missed that one. :)
The variable should be written very rarely, so there should be no
performance impact for a normal system. Still, it's a valid point and
for consistency it should be moved.
There's room right before the u8 variables further down, I'll move
it there.
-Olof
prev parent reply other threads:[~2007-04-23 13:35 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-16 6:23 [PATCH] powerpc: save trap number in bad_stack Olof Johansson
2007-04-19 23:17 ` Benjamin Herrenschmidt
2007-04-20 2:18 ` Michael Ellerman
2007-04-20 8:51 ` Segher Boessenkool
2007-04-22 23:34 ` Olof Johansson
2007-04-22 23:38 ` [PATCH] [v2] " Olof Johansson
2007-04-23 9:29 ` Gabriel Paubert
2007-04-23 11:49 ` Olof Johansson
2007-04-23 12:19 ` [PATCH] [v3] " Olof Johansson
2007-04-23 15:11 ` [PATCH] [v4] " Olof Johansson
2007-04-23 15:34 ` Stephen Rothwell
2007-04-23 13:22 ` [PATCH] [v2] " Stephen Rothwell
2007-04-23 13:33 ` Michael Ellerman
2007-04-23 13:39 ` David Gibson
2007-04-23 13:54 ` Olof Johansson [this message]
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=20070423135430.GA1805@lixom.net \
--to=olof@lixom.net \
--cc=anton@samba.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.org \
--cc=sfr@canb.auug.org.au \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).