Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Feb 2011 16:32:35 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r218284 - in stable/7/sys: kern sys
Message-ID:  <201102041632.p14GWZMo090613@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Fri Feb  4 16:32:34 2011
New Revision: 218284
URL: http://svn.freebsd.org/changeset/base/218284

Log:
  MFC 217292:
  - Retire some unused ithread priorities: PI_TTYHIGH, PI_TAPE, and
    PI_DISKLOW.  While here, rename PI_TTYLOW to PI_TTY.
  - Add a macro PI_SWI() that takes a SWI_* constant as an argument and
    returns the suitable thread priority.
  
  To preserve the KBI, I did not renumber priorities but simply removed
  unused ones.

Modified:
  stable/7/sys/kern/kern_intr.c
  stable/7/sys/sys/priority.h
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/kern/kern_intr.c
==============================================================================
--- stable/7/sys/kern/kern_intr.c	Fri Feb  4 16:30:13 2011	(r218283)
+++ stable/7/sys/kern/kern_intr.c	Fri Feb  4 16:32:34 2011	(r218284)
@@ -128,22 +128,18 @@ intr_priority(enum intr_type flags)
 	    INTR_TYPE_CAM | INTR_TYPE_MISC | INTR_TYPE_CLK | INTR_TYPE_AV);
 	switch (flags) {
 	case INTR_TYPE_TTY:
-		pri = PI_TTYLOW;
+		pri = PI_TTY;
 		break;
 	case INTR_TYPE_BIO:
-		/*
-		 * XXX We need to refine this.  BSD/OS distinguishes
-		 * between tape and disk priorities.
-		 */
 		pri = PI_DISK;
 		break;
 	case INTR_TYPE_NET:
 		pri = PI_NET;
 		break;
 	case INTR_TYPE_CAM:
-		pri = PI_DISK;          /* XXX or PI_CAM? */
+		pri = PI_DISK;
 		break;
-	case INTR_TYPE_AV:		/* Audio/video */
+	case INTR_TYPE_AV:
 		pri = PI_AV;
 		break;
 	case INTR_TYPE_CLK:
@@ -1051,7 +1047,7 @@ swi_add(struct intr_event **eventp, cons
 			*eventp = ie;
 	}
 	return (intr_event_add_handler(ie, name, NULL, handler, arg,
-		    (pri * RQ_PPQ) + PI_SOFT, flags, cookiep));
+		    PI_SWI(pri), flags, cookiep));
 		    /* XXKSE.. think of a better way to get separate queues */
 }
 
@@ -1594,18 +1590,13 @@ db_dump_intrhand(struct intr_handler *ih
 	case PI_AV:
 		db_printf("AV  ");
 		break;
-	case PI_TTYHIGH:
-	case PI_TTYLOW:
+	case PI_TTY:
 		db_printf("TTY ");
 		break;
-	case PI_TAPE:
-		db_printf("TAPE");
-		break;
 	case PI_NET:
 		db_printf("NET ");
 		break;
 	case PI_DISK:
-	case PI_DISKLOW:
 		db_printf("DISK");
 		break;
 	case PI_DULL:

Modified: stable/7/sys/sys/priority.h
==============================================================================
--- stable/7/sys/sys/priority.h	Fri Feb  4 16:30:13 2011	(r218283)
+++ stable/7/sys/sys/priority.h	Fri Feb  4 16:32:34 2011	(r218284)
@@ -85,14 +85,12 @@
 
 #define	PI_REALTIME		(PRI_MIN_ITHD + 0)
 #define	PI_AV			(PRI_MIN_ITHD + 4)
-#define	PI_TTYHIGH		(PRI_MIN_ITHD + 8)
-#define	PI_TAPE			(PRI_MIN_ITHD + 12)
 #define	PI_NET			(PRI_MIN_ITHD + 16)
 #define	PI_DISK			(PRI_MIN_ITHD + 20)
-#define	PI_TTYLOW		(PRI_MIN_ITHD + 24)
-#define	PI_DISKLOW		(PRI_MIN_ITHD + 28)
+#define	PI_TTY			(PRI_MIN_ITHD + 24)
 #define	PI_DULL			(PRI_MIN_ITHD + 32)
 #define	PI_SOFT			(PRI_MIN_ITHD + 36)
+#define	PI_SWI(x)		(PI_SOFT + (x) * RQ_PPQ)
 
 #define	PRI_MIN_KERN		(64)
 #define	PRI_MAX_KERN		(PRI_MIN_REALTIME - 1)



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