diff options
-rw-r--r-- | kern/thread.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kern/thread.c b/kern/thread.c index 28d0176e..a27861f3 100644 --- a/kern/thread.c +++ b/kern/thread.c @@ -256,6 +256,7 @@ struct thread_runq { struct syscnt sc_schedule_intr; struct syscnt sc_tick_intr; + struct syscnt sc_boosts; } __aligned(CPU_L1_SIZE); /* @@ -454,6 +455,8 @@ thread_runq_init(struct thread_runq *runq, unsigned int cpu, syscnt_register(&runq->sc_schedule_intr, name); snprintf(name, sizeof(name), "thread_tick_intr/%u", cpu); syscnt_register(&runq->sc_tick_intr, name); + snprintf(name, sizeof(name), "thread_boosts/%u", cpu); + syscnt_register(&runq->sc_boosts, name); } static inline struct thread_runq * @@ -2574,6 +2577,8 @@ thread_pi_setscheduler(struct thread *thread, unsigned char policy, goto out; } + syscnt_inc(&runq->sc_boosts); + requeue = thread->in_runq; if (!requeue) { |