From owner-freebsd-current@FreeBSD.ORG Fri Mar 13 00:07:26 2009 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E852106566C for ; Fri, 13 Mar 2009 00:07:26 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 6F5458FC14 for ; Fri, 13 Mar 2009 00:07:25 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.local ([192.168.254.200]) (authenticated bits=0) by pooker.samsco.org (8.14.2/8.14.2) with ESMTP id n2CNgRFP045647; Thu, 12 Mar 2009 17:42:28 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <49B99DE3.6050401@samsco.org> Date: Thu, 12 Mar 2009 17:42:27 -0600 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.13) Gecko/20080313 SeaMonkey/1.1.9 MIME-Version: 1.0 To: barney_cordoba@yahoo.com References: <156527.19600.qm@web63901.mail.re1.yahoo.com> In-Reply-To: <156527.19600.qm@web63901.mail.re1.yahoo.com> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=3.8 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: current@freebsd.org Subject: Re: Interrupt routine usage not shown by top in 8.0 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Mar 2009 00:07:26 -0000 Barney Cordoba wrote: > I'm fireing 400Kpps at a udp blackhole port. I'm getting 6000 interrupts > per second on em3: > > testbox# vmstat -i; sleep 1; vmstat -i > interrupt total rate > irq1: atkbd0 1 0 > irq6: fdc0 1 0 > irq17: uhci1+ 2226 9 > irq18: uhci2 ehci+ 9 0 > cpu0: timer 470507 1993 > irq256: em0 665 2 > irq259: em3 1027684 4354 > cpu1: timer 470272 1992 > cpu3: timer 470273 1992 > cpu2: timer 470273 1992 > Total 2911911 12338 > > interrupt total rate > irq1: atkbd0 1 0 > irq6: fdc0 1 0 > irq17: uhci1+ 2226 9 > irq18: uhci2 ehci+ 9 0 > cpu0: timer 472513 1993 > irq256: em0 668 2 > irq259: em3 1033703 4361 > cpu1: timer 472278 1992 > cpu3: timer 472279 1992 > cpu2: timer 472279 1992 > Total 2925957 12345 > > > top -SH shows: > > PID STATE C TIME CPU COMMAND > 10 CPU3 3 7:32 100.00% idle > 10 CPU2 2 7:32 100.00% idle > 10 RUN 0 7:31 100.00% idle > 10 CPU1 1 7:31 100.00% idle > > This implies that CPU usage is substantially under-reported in general > by the system. Note that I've modified em_irq_fast() to call > em_handle_rxtx() directly rather than scheduling a task to illustrate > the problem > With unmodified code, what do you see? Are you sending valid UDP frames with valid checksums and a valid port, or is everything that you're blasting at the interface getting dropped right away? Calling em_handle_rxtx() directly will cause a very quick panic once you start handling real traffic and you encounter a lock. Scott