summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorLuiz Souza <luiz@netgate.com>2018-02-23 19:43:32 -0300
committerLuiz Souza <luiz@netgate.com>2018-02-23 19:43:32 -0300
commitf2d4631b091fcc0fb94bee855637c6d006257bcd (patch)
tree17272b00ab33fe8cef700e28311d15786f6e0f39 /sys
parentf30c45826ac3ba99ee40d74d26037ef7463c7575 (diff)
downloadFreeBSD-src-f2d4631b091fcc0fb94bee855637c6d006257bcd.zip
FreeBSD-src-f2d4631b091fcc0fb94bee855637c6d006257bcd.tar.gz
Revert "Revert "MFC 324487""
This reverts commit b460f09baf0c2742553aa6770746ab69e19b095a.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/hyperv/vmbus/vmbus.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/sys/dev/hyperv/vmbus/vmbus.c b/sys/dev/hyperv/vmbus/vmbus.c
index dc924d0..e8c683f 100644
--- a/sys/dev/hyperv/vmbus/vmbus.c
+++ b/sys/dev/hyperv/vmbus/vmbus.c
@@ -128,6 +128,13 @@ static void vmbus_event_proc_dummy(struct vmbus_softc *,
static struct vmbus_softc *vmbus_sc;
+SYSCTL_NODE(_hw, OID_AUTO, vmbus, CTLFLAG_RD | CTLFLAG_MPSAFE, NULL,
+ "Hyper-V vmbus");
+
+static int vmbus_pin_evttask = 1;
+SYSCTL_INT(_hw_vmbus, OID_AUTO, pin_evttask, CTLFLAG_RDTUN,
+ &vmbus_pin_evttask, 0, "Pin event tasks to their respective CPU");
+
extern inthand_t IDTVEC(vmbus_isr);
static const uint32_t vmbus_version[] = {
@@ -905,10 +912,16 @@ vmbus_intr_setup(struct vmbus_softc *sc)
VMBUS_PCPU_GET(sc, event_tq, cpu) = taskqueue_create_fast(
"hyperv event", M_WAITOK, taskqueue_thread_enqueue,
VMBUS_PCPU_PTR(sc, event_tq, cpu));
- CPU_SETOF(cpu, &cpu_mask);
- taskqueue_start_threads_cpuset(
- VMBUS_PCPU_PTR(sc, event_tq, cpu), 1, PI_NET, &cpu_mask,
- "hvevent%d", cpu);
+ if (vmbus_pin_evttask) {
+ CPU_SETOF(cpu, &cpu_mask);
+ taskqueue_start_threads_cpuset(
+ VMBUS_PCPU_PTR(sc, event_tq, cpu), 1, PI_NET,
+ &cpu_mask, "hvevent%d", cpu);
+ } else {
+ taskqueue_start_threads(
+ VMBUS_PCPU_PTR(sc, event_tq, cpu), 1, PI_NET,
+ "hvevent%d", cpu);
+ }
/*
* Setup tasks and taskqueues to handle messages.
OpenPOWER on IntegriCloud