kernel - Properly account system time for contending tokens
* When the LWKT schedule gets stuck on a contending token it switches
through the idle thread, the idle thread is told not to halt, and
resolution of the contention is handled by lwkt_switch() from the
idle thread's context.
* This was causing token contention to be improperly accounted for as
idle time in the per-cpu stats. Fix the case by testing the
RQF_AST_LWKT_RESCHED flag which tells the idle thread not to halt,
and account for the tick as system time if the flag is set.
* The improper time accounting was causing powerd to come to the wrong
conclusion in massively parralel fsstress tests on monster.dragonflybsd.org
(48 cpus). With the fix, powerd no longer becomes confused.
Reported-by: vsrinivas