From owner-svn-src-all@FreeBSD.ORG Mon Mar 9 17:24:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 48020BA1; Mon, 9 Mar 2015 17:24:23 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 18C1FA91; Mon, 9 Mar 2015 17:24:23 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 29ABFB97F; Mon, 9 Mar 2015 13:24:22 -0400 (EDT) From: John Baldwin To: Sergey Kandaurov Subject: Re: svn commit: r279699 - in head/sys: amd64/amd64 i386/i386 Date: Mon, 09 Mar 2015 11:30:41 -0400 Message-ID: <3050157.0anzMatu84@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: References: <201503062034.t26KYSP2063973@svn.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 09 Mar 2015 13:24:22 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Roger Pau =?ISO-8859-1?Q?Monn=E9?= X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 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, 09 Mar 2015 17:24:23 -0000 On Saturday, March 07, 2015 12:55:06 AM Sergey Kandaurov wrote: > On 6 March 2015 at 23:34, John Baldwin wrote: > > Author: jhb > > Date: Fri Mar 6 20:34:28 2015 > > New Revision: 279699 > > URL: https://svnweb.freebsd.org/changeset/base/279699 > > > > Log: > > Only schedule interrupts on a single hyperthread of a modern Intel CPU > > core > > by default. Previously we used a single hyperthread on Pentium4-era > > cores but used both hyperthreads on more recent CPUs. > > > > MFC after: 2 weeks > > > > Modified: > > head/sys/amd64/amd64/mp_machdep.c > > head/sys/i386/i386/mp_machdep.c > > > > Modified: head/sys/amd64/amd64/mp_machdep.c > > ========================================================================== > > ==== --- head/sys/amd64/amd64/mp_machdep.c Fri Mar 6 16:43:54 2015 > > (r279698) +++ head/sys/amd64/amd64/mp_machdep.c Fri Mar 6 20:34:28 > > 2015 (r279699) @@ -828,8 +828,8 @@ set_interrupt_apic_ids(void) > > > > continue; > > > > /* Don't let hyperthreads service interrupts. */ > > > > - if (hyperthreading_cpus > 1 && > > - apic_id % hyperthreading_cpus != 0) > > + if (cpu_logical > 1 && > > + apic_id % cpu_logical != 0) > > > > continue; > > > > intr_add_cpu(i); > > > > Modified: head/sys/i386/i386/mp_machdep.c > > ========================================================================== > > ==== --- head/sys/i386/i386/mp_machdep.c Fri Mar 6 16:43:54 2015 > > (r279698) +++ head/sys/i386/i386/mp_machdep.c Fri Mar 6 20:34:28 > > 2015 (r279699) @@ -842,8 +842,8 @@ set_interrupt_apic_ids(void) > > > > continue; > > > > /* Don't let hyperthreads service interrupts. */ > > > > - if (hyperthreading_cpus > 1 && > > - apic_id % hyperthreading_cpus != 0) > > + if (cpu_logical > 1 && > > + apic_id % cpu_logical != 0) > > > > continue; > > > > intr_add_cpu(i); > > There are another two similar cases at sys/i386/xen/mp_machdep.c > Both look like a no-op: static global never gets written data, > the condition is never satisfied. > I guess these variables can be safely reduced for clarity there: > hyperthreading_cpus, hyperthreading_cpus_mask under i386/xen. Yes, that file is rotted a bit. I think it is for a mode of Xen that Xen doesn't intend to support in the future and that it will be dropped from our tree altogether at some point? Roger probably has a better feel on this? -- John Baldwin