From owner-svn-src-all@FreeBSD.ORG Fri Mar 6 21:55:08 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 575025CC; Fri, 6 Mar 2015 21:55:08 +0000 (UTC) Received: from mail-wg0-x229.google.com (mail-wg0-x229.google.com [IPv6:2a00:1450:400c:c00::229]) (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 DD5DD947; Fri, 6 Mar 2015 21:55:07 +0000 (UTC) Received: by wggx13 with SMTP id x13so22616635wgg.4; Fri, 06 Mar 2015 13:55:06 -0800 (PST) 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=cu5cPXZu3AzP0cGFtjnC7uqWdJZJ1ja8us8FWMQNuKc=; b=iQzGUX9QBi3SRxJf9esl65LoP+sZVmKow2d1LdhDkntgqmNtTxU+dSa7/42j/94xn1 T0j27pAjiPUGNgEpGK0N5tFmrUMErqpC93m+U3jXyOnHHwtScadV5OdaGrrdNd47hN3w SAH7vyMiFWI7ON9lgd8aJULUbUt9jjpcDPPJGDoQCv9IKrGKejWePiT+qClQ4knr5LTd dPH4cRykui4avDjJgJOhr7RFVZeXkQFWUcsmlhRS5+d7UqxrH2iDZTnGk7N5ZdkT5KOt N+hGwz856l+zASjHPRcAzIIVxKmW/q+77staQDfOtT4LYfAXu0M7neLvbgfSKcm9Xtx8 VE1Q== MIME-Version: 1.0 X-Received: by 10.194.61.161 with SMTP id q1mr34479640wjr.132.1425678906249; Fri, 06 Mar 2015 13:55:06 -0800 (PST) Sender: pluknet@gmail.com Received: by 10.27.84.132 with HTTP; Fri, 6 Mar 2015 13:55:06 -0800 (PST) In-Reply-To: <201503062034.t26KYSP2063973@svn.freebsd.org> References: <201503062034.t26KYSP2063973@svn.freebsd.org> Date: Sat, 7 Mar 2015 00:55:06 +0300 X-Google-Sender-Auth: PBHKCojuoWSlaU4-bAomLItNHlo Message-ID: Subject: Re: svn commit: r279699 - in head/sys: amd64/amd64 i386/i386 From: Sergey Kandaurov To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 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: Fri, 06 Mar 2015 21:55:08 -0000 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. -- wbr, pluknet