From owner-svn-src-all@freebsd.org Mon Nov 4 19:30:20 2019 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0AFE11ADDE0; Mon, 4 Nov 2019 19:30:20 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 476NDW6R5gz4F81; Mon, 4 Nov 2019 19:30:19 +0000 (UTC) (envelope-from gallatin@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BB9A5D08; Mon, 4 Nov 2019 19:30:19 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xA4JUJPU083720; Mon, 4 Nov 2019 19:30:19 GMT (envelope-from gallatin@FreeBSD.org) Received: (from gallatin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xA4JUJCI083719; Mon, 4 Nov 2019 19:30:19 GMT (envelope-from gallatin@FreeBSD.org) Message-Id: <201911041930.xA4JUJCI083719@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gallatin set sender to gallatin@FreeBSD.org using -f From: Andrew Gallatin Date: Mon, 4 Nov 2019 19:30:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r354338 - head/sys/x86/x86 X-SVN-Group: head X-SVN-Commit-Author: gallatin X-SVN-Commit-Paths: head/sys/x86/x86 X-SVN-Commit-Revision: 354338 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Nov 2019 19:30:20 -0000 Author: gallatin Date: Mon Nov 4 19:30:19 2019 New Revision: 354338 URL: https://svnweb.freebsd.org/changeset/base/354338 Log: Add tunable to allow interrupts on hyperthreaded cores Enabling interrupts on htt cores has benefits to workloads which are primarily interrupt driven by increasing the logical cores available for interrupt handling. The tunable is named machdep.hyperthreading_intr_allowed Reviewed by: kib, jhb Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D22233 Modified: head/sys/x86/x86/mp_x86.c Modified: head/sys/x86/x86/mp_x86.c ============================================================================== --- head/sys/x86/x86/mp_x86.c Mon Nov 4 18:34:29 2019 (r354337) +++ head/sys/x86/x86/mp_x86.c Mon Nov 4 19:30:19 2019 (r354338) @@ -144,6 +144,11 @@ static int hyperthreading_allowed = 1; SYSCTL_INT(_machdep, OID_AUTO, hyperthreading_allowed, CTLFLAG_RDTUN, &hyperthreading_allowed, 0, "Use Intel HTT logical CPUs"); +static int hyperthreading_intr_allowed = 0; +SYSCTL_INT(_machdep, OID_AUTO, hyperthreading_intr_allowed, CTLFLAG_RDTUN, + &hyperthreading_intr_allowed, 0, + "Allow interrupts on HTT logical CPUs"); + static struct topo_node topo_root; static int pkg_id_shift; @@ -1121,7 +1126,8 @@ set_interrupt_apic_ids(void) continue; /* Don't let hyperthreads service interrupts. */ - if (cpu_info[apic_id].cpu_hyperthread) + if (cpu_info[apic_id].cpu_hyperthread && + !hyperthreading_intr_allowed) continue; intr_add_cpu(i);