diff --git a/sys/kern/kern_intr.c b/sys/kern/kern_intr.c index 7693954f5175..00d512e376b7 100644 --- a/sys/kern/kern_intr.c +++ b/sys/kern/kern_intr.c @@ -583,8 +583,6 @@ swi_sched(void *cookie, int flags) struct intr_event *ie = ih->ih_event; int error; - PCPU_LAZY_INC(cnt.v_intr); - CTR3(KTR_INTR, "swi_sched: %s %s need=%d", ie->ie_name, ih->ih_name, ih->ih_need); @@ -594,7 +592,9 @@ swi_sched(void *cookie, int flags) * it will execute it the next time it runs. */ atomic_store_rel_int(&ih->ih_need, 1); + if (!(flags & SWI_DELAY)) { + PCPU_LAZY_INC(cnt.v_soft); error = intr_event_schedule_thread(ie); KASSERT(error == 0, ("stray software interrupt")); } diff --git a/sys/kern/subr_trap.c b/sys/kern/subr_trap.c index c6af66b9ca26..d5c03b712575 100644 --- a/sys/kern/subr_trap.c +++ b/sys/kern/subr_trap.c @@ -190,7 +190,7 @@ ast(struct trapframe *framep) #endif td->td_flags &= ~(TDF_ASTPENDING | TDF_NEEDSIGCHK | TDF_NEEDRESCHED | TDF_INTERRUPT); - cnt.v_soft++; + cnt.v_trap++; mtx_unlock_spin(&sched_lock); /*