From owner-freebsd-hackers@FreeBSD.ORG Thu May 31 15:25:06 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6CC331065672; Thu, 31 May 2012 15:25:06 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 3925F8FC0A; Thu, 31 May 2012 15:25:06 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id AECB6B911; Thu, 31 May 2012 11:25:05 -0400 (EDT) From: John Baldwin To: Adrian Chadd Date: Thu, 31 May 2012 10:55:27 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p13; KDE/4.5.5; amd64; ; ) References: <201205301124.52597.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201205311055.27648.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 31 May 2012 11:25:05 -0400 (EDT) Cc: freebsd-hackers@freebsd.org, Alexander Motin Subject: Re: ULE/sched issues on stable/9 - why isn't preemption occuring? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 May 2012 15:25:06 -0000 On Wednesday, May 30, 2012 6:02:15 pm Adrian Chadd wrote: > Hi, > > I've re-run the test with powerd and sleep state stuff disabled - lo > and behold, UDP tests are now up around 240-250MBit, what I'd expect > for this 2 stream 11n device. > > So why is it that I lose roughly 80MBit of throughput with powerd and > C2/C3 enabled, when there's plenty of CPU going around? The NIC > certainly isn't going to sleep (I've not even added that code.) Why do you not expect that? I would try, btw, just disabling powerd for now and leaving C2/C3 enabled to see if that makes a difference. As to my first question, with powerd enabled and an otherwise idle machine, powerd may very well be running your CPU at some rediculously low speed (like 100 Mhz) pretty much all the time. Do you really think you could push more than 80 MBit with a 100 MHz CPU? Secondly, just having a lot of CPU isn't enough if you don't have it quickly. Latency matters, too. Take a look at your C2/C3 info like so: dev.cpu.0.cx_supported: C1/3 C2/59 C3/93 IIRC, the last number is the number of microseconds the CPU takes to resume from an interrupt. So, on this box (a Core i5), it can take 93 us after an interrupt occurs during C3 before the CPU will get around to executing the first instruction. It might be worse on your machine. -- John Baldwin