linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Olof Johansson <olof@lixom.net>,
	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 23:39:13 +1000	[thread overview]
Message-ID: <20070423133913.GA12965@localhost.localdomain> (raw)
In-Reply-To: <20070423232217.08e420a6.sfr@canb.auug.org.au>

[-- Attachment #1: Type: text/plain, Size: 1312 bytes --]

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.

Afaict, Olof's patch only writes to that field when we're about to
enter the bad_stack path.  In that case we're sufficiently screwed
that I don't think some extra cacheline bouncing matters.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  parent reply	other threads:[~2007-04-23 13:39 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 [this message]
2007-04-23 13:54     ` Olof Johansson

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=20070423133913.GA12965@localhost.localdomain \
    --to=david@gibson.dropbear.id.au \
    --cc=anton@samba.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=olof@lixom.net \
    --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).