From owner-svn-src-all@FreeBSD.ORG Mon Mar 9 17:43:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5D14C2C7; Mon, 9 Mar 2015 17:43:03 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C1BE0D07; Mon, 9 Mar 2015 17:43:02 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t29HgqQb063968 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 9 Mar 2015 19:42:52 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t29HgqQb063968 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t29HgqDu063967; Mon, 9 Mar 2015 19:42:52 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 9 Mar 2015 19:42:52 +0200 From: Konstantin Belousov To: John Baldwin Subject: Re: svn commit: r279699 - in head/sys: amd64/amd64 i386/i386 Message-ID: <20150309174252.GO2379@kib.kiev.ua> References: <201503062034.t26KYSP2063973@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201503062034.t26KYSP2063973@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org 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:43:03 -0000 On Fri, Mar 06, 2015 at 08:34:28PM +0000, 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); BTW, this sounds somewhat backward from the intention of the HTT/SMT. The feature was aimed to reduce latency of memory or device registers reads by allowing several contexts to stuck on the cache line fill or waiting for the device response to read request. Since typical interrupt handler just EOIs the source or does nothing at all to the source, what is the reasoning behind the change ?