From owner-svn-src-all@FreeBSD.ORG Thu Mar 12 03:46:11 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 7C597264; Thu, 12 Mar 2015 03:46:11 +0000 (UTC) Received: from mail-ie0-x22e.google.com (mail-ie0-x22e.google.com [IPv6:2607:f8b0:4001:c03::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 40D48D21; Thu, 12 Mar 2015 03:46:11 +0000 (UTC) Received: by iegc3 with SMTP id c3so14580609ieg.3; Wed, 11 Mar 2015 20:46:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=3N6NGGVtqQvXjNsvBknZOEXd1ZrSbpLSLeYtCz7owc0=; b=a3ZalDzcIB/ChyLXLNJUN1IfSFFMfOGEHO51AJ0Gt9iIkdlETDXHnKdv1Z1FLsrxL1 WBMUT7FaVAM4hPCHLtxBp+ljQIbm0hlzvnP86u5aRxUjNkz+i2vodjLExhL3nSKOTaGq XYIhAcVqLvvGrZO/NqgOFk73hZuWkJNbCvG75fsKtpi6p39lEbmVqABoHbipNJFhMIv7 l0rUR9vXrwght1TvqC7kYNJqCJHI0RdKDqjF+jE/g/j47Ren+Jnlv4D4VIf4+fzg2u3p zSQaUqry4u4MvweV1AroHJ6mH3SzFDpgtPkkZR23q1xlZNQTw3INQwixZGAJ1FCs2d05 K/Iw== MIME-Version: 1.0 X-Received: by 10.202.133.131 with SMTP id h125mr30625044oid.23.1426131970627; Wed, 11 Mar 2015 20:46:10 -0700 (PDT) Sender: royger@gmail.com Received: by 10.60.22.199 with HTTP; Wed, 11 Mar 2015 20:46:10 -0700 (PDT) In-Reply-To: <3050157.0anzMatu84@ralph.baldwin.cx> References: <201503062034.t26KYSP2063973@svn.freebsd.org> <3050157.0anzMatu84@ralph.baldwin.cx> Date: Thu, 12 Mar 2015 12:46:10 +0900 X-Google-Sender-Auth: OJqgW7QWtx24j4BQn7Q431IOt8Y Message-ID: Subject: Re: svn commit: r279699 - in head/sys: amd64/amd64 i386/i386 From: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= To: John Baldwin Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Sergey Kandaurov , "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: Thu, 12 Mar 2015 03:46:11 -0000 Hello, On Tue, Mar 10, 2015 at 12:30 AM, John Baldwin wrote: > 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? Yes, the i386 PV port has completely bitrotted since a long time ago, and AFAIK nobody has interest in fixing it so I plan to remove it soon. Roger.