diff options
author | Richard Braun <rbraun@sceen.net> | 2014-05-13 09:01:54 +0200 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2014-05-13 09:01:54 +0200 |
commit | 611f4117f81cc40eb8772ead79dc1accb0b5f48f (patch) | |
tree | 3bc9e8ea67d8eaf568f42b092c2c979ddefd676f /kern/thread.c | |
parent | 5360e7df0c69fcee387497742a8d3016db5c9b0c (diff) |
kern/thread: slightly improve tick counting
Move the increment outside of the run queue critical section.
Diffstat (limited to 'kern/thread.c')
-rw-r--r-- | kern/thread.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/kern/thread.c b/kern/thread.c index 6b9d949c..60f57904 100644 --- a/kern/thread.c +++ b/kern/thread.c @@ -2002,13 +2002,12 @@ thread_tick_intr(void) assert(!thread_preempt_enabled()); runq = thread_runq_local(); + evcnt_inc(&runq->ev_tick); llsync_commit_checkpoint(thread_runq_id(runq)); thread = thread_self(); spinlock_lock(&runq->lock); - evcnt_inc(&runq->ev_tick); - if (runq->nr_threads == 0) thread_balance_idle_tick(runq); |