From owner-svn-src-stable@freebsd.org Fri Oct 13 02:01:05 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D349E3A431; Fri, 13 Oct 2017 02:01:05 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DFC4C6F9B7; Fri, 13 Oct 2017 02:01:04 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v9D214Fb017094; Fri, 13 Oct 2017 02:01:04 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v9D2141B017093; Fri, 13 Oct 2017 02:01:04 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201710130201.v9D2141B017093@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 13 Oct 2017 02:01:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r324572 - stable/10/sys/dev/hyperv/vmbus X-SVN-Group: stable-10 X-SVN-Commit-Author: sephe X-SVN-Commit-Paths: stable/10/sys/dev/hyperv/vmbus X-SVN-Commit-Revision: 324572 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Oct 2017 02:01:05 -0000 Author: sephe Date: Fri Oct 13 02:01:03 2017 New Revision: 324572 URL: https://svnweb.freebsd.org/changeset/base/324572 Log: MFC 324487 hyperv/vmbus: Add tunable to pin/unpin event tasks. Event tasks are pinned to their respective CPU by default, in the same fashion as they were. Unpin the event tasks by setting hw.vmbus.pin_evttask to 0, if certain CPUs serve special purpose. Sponsored by: Microsoft Modified: stable/10/sys/dev/hyperv/vmbus/vmbus.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hyperv/vmbus/vmbus.c ============================================================================== --- stable/10/sys/dev/hyperv/vmbus/vmbus.c Thu Oct 12 21:58:51 2017 (r324571) +++ stable/10/sys/dev/hyperv/vmbus/vmbus.c Fri Oct 13 02:01:03 2017 (r324572) @@ -129,6 +129,13 @@ static struct vmbus_softc *vmbus_sc; extern inthand_t IDTVEC(rsvd), IDTVEC(vmbus_isr); +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"); + static const uint32_t vmbus_version[] = { VMBUS_VERSION_WIN8_1, VMBUS_VERSION_WIN8, @@ -978,13 +985,15 @@ vmbus_intr_setup(struct vmbus_softc *sc) taskqueue_start_threads(VMBUS_PCPU_PTR(sc, event_tq, cpu), 1, PI_NET, "hvevent%d", cpu); - CPU_SETOF(cpu, &cpu_mask); - TASK_INIT(&cpuset_task, 0, vmbus_cpuset_setthread_task, - &cpu_mask); - taskqueue_enqueue(VMBUS_PCPU_GET(sc, event_tq, cpu), - &cpuset_task); - taskqueue_drain(VMBUS_PCPU_GET(sc, event_tq, cpu), - &cpuset_task); + if (vmbus_pin_evttask) { + CPU_SETOF(cpu, &cpu_mask); + TASK_INIT(&cpuset_task, 0, vmbus_cpuset_setthread_task, + &cpu_mask); + taskqueue_enqueue(VMBUS_PCPU_GET(sc, event_tq, cpu), + &cpuset_task); + taskqueue_drain(VMBUS_PCPU_GET(sc, event_tq, cpu), + &cpuset_task); + } /* * Setup tasks and taskqueues to handle messages.