Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 May 2012 17:21:47 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r235480 - in stable/9/sys: dev/usb geom geom/mountver i386/conf kern sys
Message-ID:  <201205151721.q4FHLlgq097452@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avg
Date: Tue May 15 17:21:46 2012
New Revision: 235480
URL: http://svn.freebsd.org/changeset/base/235480

Log:
  MFC r230643: stop_scheduler -> td_stopsched

Modified:
  stable/9/sys/dev/usb/usb_transfer.c
  stable/9/sys/geom/geom_bsd.c
  stable/9/sys/geom/geom_mbr.c
  stable/9/sys/geom/geom_pc98.c
  stable/9/sys/geom/mountver/g_mountver.c
  stable/9/sys/kern/kern_shutdown.c
  stable/9/sys/sys/proc.h
  stable/9/sys/sys/systm.h
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)
  stable/9/sys/fs/   (props changed)
  stable/9/sys/fs/ntfs/   (props changed)
  stable/9/sys/i386/conf/XENHVM   (props changed)
  stable/9/sys/kern/subr_witness.c   (props changed)

Modified: stable/9/sys/dev/usb/usb_transfer.c
==============================================================================
--- stable/9/sys/dev/usb/usb_transfer.c	Tue May 15 17:11:00 2012	(r235479)
+++ stable/9/sys/dev/usb/usb_transfer.c	Tue May 15 17:21:46 2012	(r235480)
@@ -42,6 +42,7 @@
 #include <sys/callout.h>
 #include <sys/malloc.h>
 #include <sys/priv.h>
+#include <sys/proc.h>
 
 #include <dev/usb/usb.h>
 #include <dev/usb/usbdi.h>

Modified: stable/9/sys/geom/geom_bsd.c
==============================================================================
--- stable/9/sys/geom/geom_bsd.c	Tue May 15 17:11:00 2012	(r235479)
+++ stable/9/sys/geom/geom_bsd.c	Tue May 15 17:21:46 2012	(r235480)
@@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/errno.h>
 #include <sys/disklabel.h>
 #include <sys/gpt.h>
+#include <sys/proc.h>
 #include <sys/sbuf.h>
 #include <sys/uuid.h>
 #include <geom/geom.h>

Modified: stable/9/sys/geom/geom_mbr.c
==============================================================================
--- stable/9/sys/geom/geom_mbr.c	Tue May 15 17:11:00 2012	(r235479)
+++ stable/9/sys/geom/geom_mbr.c	Tue May 15 17:21:46 2012	(r235480)
@@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/lock.h>
 #include <sys/mutex.h>
 #include <sys/md5.h>
+#include <sys/proc.h>
 
 #include <sys/diskmbr.h>
 #include <sys/sbuf.h>

Modified: stable/9/sys/geom/geom_pc98.c
==============================================================================
--- stable/9/sys/geom/geom_pc98.c	Tue May 15 17:11:00 2012	(r235479)
+++ stable/9/sys/geom/geom_pc98.c	Tue May 15 17:21:46 2012	(r235480)
@@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/bio.h>
 #include <sys/lock.h>
 #include <sys/mutex.h>
+#include <sys/proc.h>
 #include <sys/sbuf.h>
 
 #include <sys/diskpc98.h>

Modified: stable/9/sys/geom/mountver/g_mountver.c
==============================================================================
--- stable/9/sys/geom/mountver/g_mountver.c	Tue May 15 17:11:00 2012	(r235479)
+++ stable/9/sys/geom/mountver/g_mountver.c	Tue May 15 17:21:46 2012	(r235480)
@@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/mutex.h>
 #include <sys/bio.h>
 #include <sys/disk.h>
+#include <sys/proc.h>
 #include <sys/sbuf.h>
 #include <sys/sysctl.h>
 #include <sys/malloc.h>

Modified: stable/9/sys/kern/kern_shutdown.c
==============================================================================
--- stable/9/sys/kern/kern_shutdown.c	Tue May 15 17:11:00 2012	(r235479)
+++ stable/9/sys/kern/kern_shutdown.c	Tue May 15 17:21:46 2012	(r235480)
@@ -142,7 +142,6 @@ SYSCTL_INT(_kern_shutdown, OID_AUTO, sho
  */
 const char *panicstr;
 
-int stop_scheduler;			/* system stopped CPUs for panic */
 int dumping;				/* system is dumping */
 int rebooting;				/* system is rebooting */
 static struct dumperinfo dumper;	/* our selected dumper */
@@ -594,7 +593,7 @@ panic(const char *fmt, ...)
 		 * stop_scheduler_on_panic is true, then stop_scheduler will
 		 * always be set.  Even if panic has been entered from kdb.
 		 */
-		stop_scheduler = 1;
+		td->td_stopsched = 1;
 	}
 #endif
 

Modified: stable/9/sys/sys/proc.h
==============================================================================
--- stable/9/sys/sys/proc.h	Tue May 15 17:11:00 2012	(r235479)
+++ stable/9/sys/sys/proc.h	Tue May 15 17:21:46 2012	(r235480)
@@ -235,6 +235,7 @@ struct thread {
 	short		td_locks;	/* (k) Count of non-spin locks. */
 	short		td_rw_rlocks;	/* (k) Count of rwlock read locks. */
 	short		td_lk_slocks;	/* (k) Count of lockmgr shared locks. */
+	short		td_stopsched;	/* (k) Scheduler stopped. */
 	struct turnstile *td_blocked;	/* (t) Lock thread is blocked on. */
 	const char	*td_lockname;	/* (t) Name of lock blocked on. */
 	LIST_HEAD(, turnstile) td_contested;	/* (q) Contested locks. */

Modified: stable/9/sys/sys/systm.h
==============================================================================
--- stable/9/sys/sys/systm.h	Tue May 15 17:11:00 2012	(r235479)
+++ stable/9/sys/sys/systm.h	Tue May 15 17:21:46 2012	(r235480)
@@ -47,7 +47,6 @@
 
 extern int cold;		/* nonzero if we are doing a cold boot */
 extern int rebooting;		/* kern_reboot() has been called. */
-extern int stop_scheduler;	/* only one thread runs after panic */
 extern const char *panicstr;	/* panic message */
 extern char version[];		/* system version */
 extern char copyright[];	/* system copyright */
@@ -115,7 +114,7 @@ enum VM_GUEST { VM_GUEST_NO = 0, VM_GUES
  * Otherwise, the kernel will deadlock since the scheduler isn't
  * going to run the thread that holds any lock we need.
  */
-#define	SCHEDULER_STOPPED() __predict_false(stop_scheduler)
+#define	SCHEDULER_STOPPED() __predict_false(curthread->td_stopsched)
 
 /*
  * XXX the hints declarations are even more misplaced than most declarations



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205151721.q4FHLlgq097452>