From owner-freebsd-net@FreeBSD.ORG Tue Jul 27 14:39:33 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0006A16A4CE for ; Tue, 27 Jul 2004 14:39:32 +0000 (GMT) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id B303043D53 for ; Tue, 27 Jul 2004 14:39:32 +0000 (GMT) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.9p1/8.12.8) with ESMTP id i6REdL8M059302; Tue, 27 Jul 2004 07:39:21 -0700 (PDT) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.9p1/8.12.3/Submit) id i6REdJ1r059301; Tue, 27 Jul 2004 07:39:19 -0700 (PDT) (envelope-from rizzo) Date: Tue, 27 Jul 2004 07:39:19 -0700 From: Luigi Rizzo To: Marko Zec Message-ID: <20040727073919.A59279@xorpc.icir.org> References: <200407271336.34744.zec@tel.fer.hr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <200407271336.34744.zec@tel.fer.hr>; from zec@tel.fer.hr on Tue, Jul 27, 2004 at 01:36:34PM +0200 cc: freebsd-net@freebsd.org cc: 'James' Subject: Re: device polling takes more CPU hits?? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2004 14:39:33 -0000 On Tue, Jul 27, 2004 at 01:36:34PM +0200, Marko Zec wrote: > James, > > what timecounter method are you using, i8254 or TSC? The polling code > frequently calls microuptime(), which is very expensive (slow) with i8254, it is not _that_ frequently, it should be twice per tick. Even with the 8254 i don't think this amounts to more than 4-5us, which is a couple of percent. cheers luigi > while being reasonable fast with TSC. Since you are running with quite high > system clock (4 kHz), using i8254 could be causing the problems you've > described. > > Cheers, > > Marko > > > > On Monday 26 July 2004 22:27, Don Bowman wrote: > > From: James [mailto:haesu@towardex.com] > > > > > I have two boxes behind em0 that I can use to generate > > > 250kpps to another vlan > > > within em0 card as a test, so that bge0 is not involved in > > > the stress test. > > > Even when doing so, CPU load climbs higher with device > > > polling turned on. > > > Opened up systat, etc to check the interrupts, and em0 is > > > generating 0 > > > interrupts with device polling on (as obvious), but general > > > interrupt load > > > climbs rock high.. so I don't know what's causing it to > > > climb. Cleared the > > > firewall rules as well as a test... no difference :( > > > > > > Oh also, just FYI, each vlan interface has link0 set, since > > > em(4) supports > > > hardware 802.1q tag/detagging. > > > > The CPU time during the 'polling' is charged to interrupt, > > even though it occurs during softclock. That's why you > > see 0 interrupts, but high CPU usage in interrupt. > > Did u try lowering the 'register' access? > > > > --don > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"