diff options
author | davide <davide@FreeBSD.org> | 2013-03-04 11:22:19 +0000 |
---|---|---|
committer | davide <davide@FreeBSD.org> | 2013-03-04 11:22:19 +0000 |
commit | 9ad2265733ae27758ebf470fc60be9e94434b5ac (patch) | |
tree | aaf83e0c10b6cfe3059115e6dbf95f87fb79c482 /sys/kern/kern_intr.c | |
parent | 431035cf16837066ffdc5abc7e48a56cc1dfed5d (diff) | |
download | FreeBSD-src-9ad2265733ae27758ebf470fc60be9e94434b5ac.zip FreeBSD-src-9ad2265733ae27758ebf470fc60be9e94434b5ac.tar.gz |
MFcalloutng (r244355):
Make loadavg calculation callout direct. There are several reasons for it:
- it is very simple and doesn't worth context switch to SWI;
- since SWI is no longer used here, we can remove twelve years old hack,
excluding this SWI from from the loadavg statistics;
- it fixes problem when eventtimer (HPET) shares interrupt with some other
device, and that interrupt thread counted as permanent loadavg of 1; now
loadavg accounted before that interrupt thread is scheduled.
Sponsored by: Google Summer of Code 2012, iXsystems inc.
Tested by: flo, marius, ian, Fabian Keil, markj
Diffstat (limited to 'sys/kern/kern_intr.c')
-rw-r--r-- | sys/kern/kern_intr.c | 11 |
1 files changed, 1 insertions, 10 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); } /* |