linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Neuling <mikey@neuling.org>
To: Olof Johansson <olof@lixom.net>
Cc: linuxppc-dev@ozlabs.org, RAISCH@de.ibm.com,
	Paul Mackerras <paulus@samba.org>,
	THEMANN@de.ibm.com
Subject: Re: [PATCH 2/2] kdump shutdown hook support
Date: Thu, 13 Dec 2007 11:53:55 +1100	[thread overview]
Message-ID: <5018.1197507235@neuling.org> (raw)
In-Reply-To: <20071212070150.GC786@lixom.net>


> 
> > +		if (setjmp(crash_shutdown_buf) == 0) {
> > +			asm volatile("sync; isync");
> > +			crash_shutdown_handles[i]();
> > +			asm volatile("sync; isync");
> > +			__delay(200);
> 
> This looks a bit random. Why the handcoded barriers, and why the delay?
> I don't see a need for the barriers at all here?

I was following the bouncing ball here from the xmon code.  We don't
want the hardware executing any of potentially dangerous hooks before
we've setup the setjmp save buffer.  Similar, any code past the
dangerous hooks shouldn't be executed before we take a machine check.

It's definitely not a fast path so.... :-)

> At least comment why the delay is needed (and why just 200 is
> sufficient). 

xmon.c says: 
   /* wait a little while to see if we get a machine check */

I'll update the "200" with a #define SETJMP_MACHINE_CHECK_DELAY and push
the same change into the xmon code.  This delay in the machine check is
apparently required on 601 machines.

All you other comments I agree with.

Mikey

  reply	other threads:[~2007-12-13  0:53 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-12  5:45 [PATCH 2/2] kdump shutdown hook support Michael Neuling
2007-12-12  7:01 ` Olof Johansson
2007-12-13  0:53   ` Michael Neuling [this message]
2007-12-12 23:07 ` Michael Ellerman
2007-12-13  0:04   ` Michael Neuling
2007-12-13  3:16 ` [PATCH 0/2] Add crashdump shutdown hooks Michael Neuling
2007-12-13  3:16   ` [PATCH 1/2] Make setjmp/longjmp code generic Michael Neuling
2007-12-13  3:16   ` [PATCH 2/2] kdump shutdown hook support Michael Neuling
2007-12-13  5:12     ` Olof Johansson
2007-12-13  5:13       ` Olof Johansson
2007-12-13  9:59       ` [PATCH 0/2] Add crashdump shutdown hooks Michael Neuling
2007-12-13  9:59         ` [PATCH 1/2] Make setjmp/longjmp code generic Michael Neuling
2007-12-13  9:59         ` [PATCH 2/2] kdump shutdown hook support Michael Neuling
2008-01-17  4:45         ` [PATCH 0/2] Add crashdump shutdown hooks Michael Neuling
2008-01-17  4:45           ` [PATCH 1/2] Make setjmp/longjmp code generic Michael Neuling
2008-01-17  5:38             ` Olof Johansson
2008-01-17  5:36               ` Michael Neuling
2008-01-17  6:36                 ` Stephen Rothwell
2008-01-17 12:45                 ` Josh Boyer
2008-01-17 21:49                   ` Michael Ellerman
2008-01-17 22:16                 ` [PATCH] Add crashdump shutdown hooks Michael Neuling
2008-01-17 22:16                   ` [PATCH] Make setjmp/longjmp code generic Michael Neuling
2008-01-18  4:50                   ` [PATCH 0/2] Add crashdump shutdown hooks Michael Neuling
2008-01-18  4:50                     ` [PATCH 2/2] kdump shutdown hook support Michael Neuling
2008-01-18  4:50                     ` [PATCH 1/2] Make setjmp/longjmp code generic Michael Neuling
2008-01-17  6:39             ` Stephen Rothwell
2008-01-17  4:45           ` [PATCH 2/2] kdump shutdown hook support Michael Neuling

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=5018.1197507235@neuling.org \
    --to=mikey@neuling.org \
    --cc=RAISCH@de.ibm.com \
    --cc=THEMANN@de.ibm.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=olof@lixom.net \
    --cc=paulus@samba.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 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).