From owner-freebsd-current@FreeBSD.ORG  Tue Feb  7 22:43:23 2006
Return-Path: <owner-freebsd-current@FreeBSD.ORG>
X-Original-To: freebsd-current@freebsd.org
Delivered-To: freebsd-current@freebsd.org
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 2C62516A422;
	Tue,  7 Feb 2006 22:43:23 +0000 (GMT) (envelope-from jhb@freebsd.org)
Received: from speedfactory.net (mail6.speedfactory.net [66.23.216.219])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 602E443D48;
	Tue,  7 Feb 2006 22:43:21 +0000 (GMT) (envelope-from jhb@freebsd.org)
Received: from server.baldwin.cx (unverified [66.23.211.162]) 
	by speedfactory.net (SurgeMail 3.5b3) with ESMTP id 7963647 
	for multiple; Tue, 07 Feb 2006 17:42:59 -0500
Received: from localhost (john@localhost [127.0.0.1])
	by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k17Mh70T052129;
	Tue, 7 Feb 2006 17:43:07 -0500 (EST) (envelope-from jhb@freebsd.org)
From: John Baldwin <jhb@freebsd.org>
To: Andrew Gallatin <gallatin@cs.duke.edu>
Date: Tue, 7 Feb 2006 17:30:51 -0500
User-Agent: KMail/1.9.1
References: <17379.56708.421007.613310@grasshopper.cs.duke.edu>
	<200602071037.05314.jhb@freebsd.org>
	<17385.7187.845964.182297@grasshopper.cs.duke.edu>
In-Reply-To: <17385.7187.845964.182297@grasshopper.cs.duke.edu>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200602071730.53881.jhb@freebsd.org>
X-Virus-Scanned: ClamAV 0.87.1/1280/Tue Feb 7 05:11:53 2006 on
	server.baldwin.cx
X-Virus-Status: Clean
X-Spam-Status: No, score=-1.4 required=4.2 tests=ALL_TRUSTED autolearn=failed 
	version=3.1.0
X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx
X-Server: High Performance Mail Server - http://surgemail.com r=1653887525
Cc: freebsd-current@freebsd.org, Andre Oppermann <andre@freebsd.org>
Subject: Re: machdep.cpu_idle_hlt and SMP perf?
X-BeenThere: freebsd-current@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Discussions about the use of FreeBSD-current
	<freebsd-current.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-current>, 
	<mailto:freebsd-current-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-current>
List-Post: <mailto:freebsd-current@freebsd.org>
List-Help: <mailto:freebsd-current-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-current>,
	<mailto:freebsd-current-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 07 Feb 2006 22:43:23 -0000

On Tuesday 07 February 2006 17:15, Andrew Gallatin wrote:
> John Baldwin writes:
>  > On Monday 06 February 2006 17:37, Andrew Gallatin wrote:
>  > > John Baldwin writes:
>  > >  > On Monday 06 February 2006 14:46, Andrew Gallatin wrote:
>  > >  > > Andre Oppermann writes:
>  > >  > >  > Andrew Gallatin wrote:
>  > >  > >  > > Why dooes machdep.cpu_idle_hlt=1 drop my 10GbE network rx
>  > >  > >  > > performance by a considerable amount (7.5Gbs -> 5.5Gbs)?
>  > >  >
>  > >  > You may be seeing problems because it might simply take a while for
>  > >  > the CPU to wake up from HLT when an interrupt comes in.  The 4BSD
>  > >  > scheduler tries to do IPIs to wakeup any sleeping CPUs when it
>  > >  > schedules a new thread, but that would add higher latency for
>  > >  > ithreads than just preempting directly to the ithread.  Oh, you
>  > >  > have to turn that on, it's off by default
>  > >  > (kern.sched.ipiwakeup.enabled=1).
>  > >
>  > > Hmm..  It seems to be on by default.  Unfortunately, it does not seem
>  > > to help.
>  >
>  > I'm not sure.
>
> One thing which really helps is disabling preemption.  If I do that,
> I get 7.7Gb/sec with machdep.cpu_idle_hlt=1.  This is slightly better
> than machdep.cpu_idle_hlt=0 and no PREEMPTION.
>
> BTW, net.isr.direct=1 in all testing.

Do you have very little userland activity in this test?

-- 
John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org