diff options
-rw-r--r-- | sys/kern/kern_intr.c | 11 | ||||
-rw-r--r-- | sys/kern/kern_synch.c | 5 |
2 files changed, 4 insertions, 12 deletions
diff --git a/sys/kern/kern_intr.c b/sys/kern/kern_intr.c index d2c31fd..8351ab8 100644 --- a/sys/kern/kern_intr.c +++ b/sys/kern/kern_intr.c @@ -1103,7 +1103,6 @@ int swi_add(struct intr_event **eventp, const char *name, driver_intr_t handler, void *arg, int pri, enum intr_type flags, void **cookiep) { - struct thread *td; struct intr_event *ie; int error; @@ -1125,15 +1124,7 @@ swi_add(struct intr_event **eventp, const char *name, driver_intr_t handler, } error = intr_event_add_handler(ie, name, NULL, handler, arg, PI_SWI(pri), flags, cookiep); - if (error) - return (error); - if (pri == SWI_CLOCK) { - td = ie->ie_thread->it_thread; - thread_lock(td); - td->td_flags |= TDF_NOLOAD; - thread_unlock(td); - } - return (0); + return (error); } /* diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c index 73dfd70..8783142 100644 --- a/sys/kern/kern_synch.c +++ b/sys/kern/kern_synch.c @@ -560,8 +560,9 @@ loadav(void *arg) * random variation to avoid synchronisation with processes that * run at regular intervals. */ - callout_reset(&loadav_callout, hz * 4 + (int)(random() % (hz * 2 + 1)), - loadav, NULL); + callout_reset_sbt(&loadav_callout, + tick_sbt * (hz * 4 + (int)(random() % (hz * 2 + 1))), 0, + loadav, NULL, C_DIRECT_EXEC | C_HARDCLOCK); } /* ARGSUSED */ |