clock: Piggyback passive IPIQ processing
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Mon, 6 Apr 2015 12:52:28 +0000 (20:52 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Wed, 8 Apr 2015 03:14:16 +0000 (11:14 +0800)
commite76d2ad39d255dbd48399fe9b26b0b636d12b536
tree086800c34ae8c147675cfa642e4ed981b5f50803
parent9d8235ab5fb04f15efb8991b52ab8d1c358c9119
clock: Piggyback passive IPIQ processing

Passive IPIs will be flushed by the target CPU at clock interrupt.
But we _never_ completely conform to the passive IPI description.

Before we implemented LAPIC interrupt timer, systimers on non-CPU0
were actually IPIQ processing, which processed the passive IPIs;
however, passive IPIQ processing on CPU0 didn't conform to the passive
IPIs description.

After the introduction of LAPIC interrupt timer, none of the systimers
were related to IPIQ processing, thus passive IPIQ processing no longer
conformed to the passive IPI description at all.

As of this commit we piggyback passive IPIQ processing in doreti after
hardclock(), which matches the passive IPI description.

* NOTE:
- We don't piggypack passive IPIQ processing directly in hardclock() to
  avoid introducing extra jitters to system time.
- We choose not to check passive IPIQ in systimer_intr(), since systimer
  rate could be pretty high, e.g. rate set by polling(4).

With-feedback-from: dillon@
sys/kern/kern_clock.c
sys/sys/thread2.h