kernel - minor cpu idle statistics adjustment
authorMatthew Dillon <dillon@apollo.backplane.com>
Thu, 17 Jul 2014 05:17:19 +0000 (22:17 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Thu, 17 Jul 2014 05:17:19 +0000 (22:17 -0700)
* Change the idlethread test from RQF_AST_LWKT_RESCHED to
  RQF_IDLECHECK_WK_MASK (which includes the first flag and adds a few more)
  to determine if the idle thread is actually idle or not.

* Should not materially change reported idle% as the original test handled
  the most common idle-thread-skips-halt case.

sys/kern/kern_clock.c

index e7e971a..0ec5edc 100644 (file)
@@ -743,7 +743,7 @@ statclock(systimer_t info, int in_ipi, struct intrframe *frame)
                                 * in the LWKT scheduler.  Count such as
                                 * system time.
                                 */
-                               if (mycpu->gd_reqflags & RQF_AST_LWKT_RESCHED)
+                               if (mycpu->gd_reqflags & RQF_IDLECHECK_WK_MASK)
                                        cpu_time.cp_sys += bump;
                                else
                                        cpu_time.cp_idle += bump;