summaryrefslogtreecommitdiffstats
path: root/sys/compat
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>2005-10-20 17:45:58 +0000
committerwpaul <wpaul@FreeBSD.org>2005-10-20 17:45:58 +0000
commitb76fb84305d303c2dfaf26c9d487e9989b946adb (patch)
treef25805b67d4acf204b16a8aa623b0d24fe44a193 /sys/compat
parentdc9d32cb6e56d6ebd74293dd58f3ee29d121fb47 (diff)
downloadFreeBSD-src-b76fb84305d303c2dfaf26c9d487e9989b946adb.zip
FreeBSD-src-b76fb84305d303c2dfaf26c9d487e9989b946adb.tar.gz
Use sched_bind() to make sure the DPC threads are bound to the correct
processor, to insure DPC thread 0 runs on CPU0, DPC thread 1 runs on CPU1, and so on. Elevate the priority of the workitem threads, though don't use as high a priority as the DPC threads.
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/ndis/subr_ntoskrnl.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/sys/compat/ndis/subr_ntoskrnl.c b/sys/compat/ndis/subr_ntoskrnl.c
index f056466..ac87f53 100644
--- a/sys/compat/ndis/subr_ntoskrnl.c
+++ b/sys/compat/ndis/subr_ntoskrnl.c
@@ -2557,6 +2557,18 @@ ntoskrnl_workitem_thread(arg)
KeInitializeEvent(&kq->kq_proc, EVENT_TYPE_SYNC, FALSE);
KeInitializeEvent(&kq->kq_dead, EVENT_TYPE_SYNC, FALSE);
+ /*
+ * Boost the priority of the workitem threads,
+ * though don't boost it as much as the DPC threads.
+ */
+
+ mtx_lock_spin(&sched_lock);
+ sched_prio(curthread, PRIBIO);
+#if __FreeBSD_version < 600000
+ curthread->td_base_pri = PRIBIO;
+#endif
+ mtx_unlock_spin(&sched_lock);
+
while (1) {
KeWaitForSingleObject(&kq->kq_proc, 0, 0, TRUE, NULL);
@@ -3562,7 +3574,9 @@ ntoskrnl_dpc_thread(arg)
*/
mtx_lock_spin(&sched_lock);
- sched_pin();
+#if __FreeBSD_version >= 502102
+ sched_bind(curthread, kq->kq_cpu);
+#endif
sched_prio(curthread, PRI_MIN_KERN);
#if __FreeBSD_version < 600000
curthread->td_base_pri = PRI_MIN_KERN;
OpenPOWER on IntegriCloud