Page MenuHomeFreeBSD

D38184.id115561.diff
No OneTemporary

D38184.id115561.diff

diff --git a/sys/kern/kern_switch.c b/sys/kern/kern_switch.c
--- a/sys/kern/kern_switch.c
+++ b/sys/kern/kern_switch.c
@@ -83,20 +83,16 @@
SYSCTL_NODE(_kern_sched, OID_AUTO, stats, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"switch stats");
-/* Switch reasons from mi_switch(). */
+/* Switch reasons from mi_switch(9). */
DPCPU_DEFINE(long, sched_switch_stats[SWT_COUNT]);
SCHED_STAT_DEFINE_VAR(uncategorized,
&DPCPU_NAME(sched_switch_stats[SWT_NONE]), "");
-SCHED_STAT_DEFINE_VAR(preempt,
- &DPCPU_NAME(sched_switch_stats[SWT_PREEMPT]), "");
SCHED_STAT_DEFINE_VAR(owepreempt,
&DPCPU_NAME(sched_switch_stats[SWT_OWEPREEMPT]), "");
SCHED_STAT_DEFINE_VAR(turnstile,
&DPCPU_NAME(sched_switch_stats[SWT_TURNSTILE]), "");
SCHED_STAT_DEFINE_VAR(sleepq,
&DPCPU_NAME(sched_switch_stats[SWT_SLEEPQ]), "");
-SCHED_STAT_DEFINE_VAR(sleepqtimo,
- &DPCPU_NAME(sched_switch_stats[SWT_SLEEPQTIMO]), "");
SCHED_STAT_DEFINE_VAR(relinquish,
&DPCPU_NAME(sched_switch_stats[SWT_RELINQUISH]), "");
SCHED_STAT_DEFINE_VAR(needresched,
diff --git a/sys/sys/proc.h b/sys/sys/proc.h
--- a/sys/sys/proc.h
+++ b/sys/sys/proc.h
@@ -904,22 +904,20 @@
#ifdef _KERNEL
-/* Types and flags for mi_switch(). */
+/* Types and flags for mi_switch(9). */
#define SW_TYPE_MASK 0xff /* First 8 bits are switch type */
#define SWT_NONE 0 /* Unspecified switch. */
-#define SWT_PREEMPT 1 /* Switching due to preemption. */
-#define SWT_OWEPREEMPT 2 /* Switching due to owepreempt. */
-#define SWT_TURNSTILE 3 /* Turnstile contention. */
-#define SWT_SLEEPQ 4 /* Sleepq wait. */
-#define SWT_SLEEPQTIMO 5 /* Sleepq timeout wait. */
-#define SWT_RELINQUISH 6 /* yield call. */
-#define SWT_NEEDRESCHED 7 /* NEEDRESCHED was set. */
-#define SWT_IDLE 8 /* Switching from the idle thread. */
-#define SWT_IWAIT 9 /* Waiting for interrupts. */
-#define SWT_SUSPEND 10 /* Thread suspended. */
-#define SWT_REMOTEPREEMPT 11 /* Remote processor preempted. */
-#define SWT_REMOTEWAKEIDLE 12 /* Remote processor preempted idle. */
-#define SWT_COUNT 13 /* Number of switch types. */
+#define SWT_OWEPREEMPT 1 /* Switching due to owepreempt. */
+#define SWT_TURNSTILE 2 /* Turnstile contention. */
+#define SWT_SLEEPQ 3 /* Sleepq wait. */
+#define SWT_RELINQUISH 4 /* yield call. */
+#define SWT_NEEDRESCHED 5 /* NEEDRESCHED was set. */
+#define SWT_IDLE 6 /* Switching from the idle thread. */
+#define SWT_IWAIT 7 /* Waiting for interrupts. */
+#define SWT_SUSPEND 8 /* Thread suspended. */
+#define SWT_REMOTEPREEMPT 9 /* Remote processor preempted. */
+#define SWT_REMOTEWAKEIDLE 10 /* Remote processor preempted idle. */
+#define SWT_COUNT 11 /* Number of switch types. */
/* Flags */
#define SW_VOL 0x0100 /* Voluntary switch. */
#define SW_INVOL 0x0200 /* Involuntary switch. */

File Metadata

Mime Type
text/plain
Expires
Wed, Jul 22, 5:11 AM (5 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35348598
Default Alt Text
D38184.id115561.diff (2 KB)

Event Timeline