All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dean Nelson <dcn@sgi.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [RFC] Extend notify_die() hooks for IA64
Date: Wed, 26 Oct 2005 19:15:52 +0000	[thread overview]
Message-ID: <20051026191552.GA20969@sgi.com> (raw)
In-Reply-To: <10137.1128667602@kao2.melbourne.sgi.com>

On Fri, Oct 07, 2005 at 04:46:42PM +1000, Keith Owens wrote:
> This mail is only for discussion, the patch is 2.6.15-rc1 material.  It
> has been compiled and has minimal testing.  Against 2.6.14-rc3.

I applied your patch to Tony Luck's test tree. Added some changes of my own
to XPC so it would register for the notify_die() callouts. And I did some
preliminary testing which showed that things for the most part worked as
advertised.

I used DIE_MACHINE_RESTART and DIE_MACHINE_HALT to get XPC to indicate to
other partitions (on a SGI Altix system) to disengage from accessing the
terminating partitions memory.

And I used DIE_MCA_MONARCH_ENTER and DIE_INIT_MONARCH_ENTER to indicate to
other partitions to ignore the fact that our heartbeat wasn't incrementing.
And I used DIE_MCA_MONARCH_LEAVE and DIE_INIT_MONARCH_LEAVE to indicate that
we should now be heartbeating again.

I also needed to make a few changes to kdebug.h and trap.c (see patch below)
to allow register_notify_die() to be utilized by a module. And I added an
unregister_notify_die() since a module can be removed. Would it be acceptable
to add such changes should your proposed patch find approval?

Is there a reason why the notify_die() callout isn't being added to
emergency_restart()?

Thanks,
Dean


Index: linux-2.6.git-test/arch/ia64/kernel/traps.c
=================================--- linux-2.6.git-test.orig/arch/ia64/kernel/traps.c	2005-10-25 08:15:13.478012900 -0500
+++ linux-2.6.git-test/arch/ia64/kernel/traps.c	2005-10-25 08:15:39.592602522 -0500
@@ -32,7 +32,8 @@
 struct notifier_block *ia64die_chain;
 static DEFINE_SPINLOCK(die_notifier_lock);
 
-int register_die_notifier(struct notifier_block *nb)
+int
+register_die_notifier(struct notifier_block *nb)
 {
 	int err = 0;
 	unsigned long flags;
@@ -41,6 +42,19 @@
 	spin_unlock_irqrestore(&die_notifier_lock, flags);
 	return err;
 }
+EXPORT_SYMBOL_GPL(register_die_notifier);
+
+int
+unregister_die_notifier(struct notifier_block *nb)
+{
+	int err = 0;
+	unsigned long flags;
+	spin_lock_irqsave(&die_notifier_lock, flags);
+	err = notifier_chain_unregister(&ia64die_chain, nb);
+	spin_unlock_irqrestore(&die_notifier_lock, flags);
+	return err;
+}
+EXPORT_SYMBOL_GPL(unregister_die_notifier);
 
 void __init
 trap_init (void)
Index: linux-2.6.git-test/include/asm-ia64/kdebug.h
=================================--- linux-2.6.git-test.orig/include/asm-ia64/kdebug.h	2005-10-25 08:15:13.475083504 -0500
+++ linux-2.6.git-test/include/asm-ia64/kdebug.h	2005-10-25 08:15:39.593578987 -0500
@@ -38,7 +38,8 @@
 	int signr;
 };
 
-int register_die_notifier(struct notifier_block *nb);
+extern int register_die_notifier(struct notifier_block *);
+extern int unregister_die_notifier(struct notifier_block *);
 extern struct notifier_block *ia64die_chain;
 
 enum die_val {

  parent reply	other threads:[~2005-10-26 19:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-07  6:46 [RFC] Extend notify_die() hooks for IA64 Keith Owens
2005-10-21 19:00 ` Dean Nelson
2005-10-26 19:15 ` Dean Nelson [this message]
2005-10-27  0:29 ` Keith Owens

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=20051026191552.GA20969@sgi.com \
    --to=dcn@sgi.com \
    --cc=linux-ia64@vger.kernel.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.