From owner-freebsd-current@FreeBSD.ORG Tue Mar 24 15:55:58 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 2302D106564A for ; Tue, 24 Mar 2009 15:55:58 +0000 (UTC) (envelope-from emaste@freebsd.org) Received: from gw2.sandvine.com (ip59.sandvine.com [64.235.97.59]) by mx1.freebsd.org (Postfix) with ESMTP id ABE298FC19 for ; Tue, 24 Mar 2009 15:55:57 +0000 (UTC) (envelope-from emaste@freebsd.org) Received: from labgw2.phaedrus.sandvine.com ([192.168.3.11]) by gw2.sandvine.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 23 Mar 2009 11:23:36 -0400 Received: by labgw2.phaedrus.sandvine.com (Postfix, from userid 12627) id 5FF5F115D9; Mon, 23 Mar 2009 11:23:36 -0400 (EDT) Date: Mon, 23 Mar 2009 11:23:36 -0400 From: Ed Maste To: Barney Cordoba Message-ID: <20090323152336.GA74200@sandvine.com> Mail-Followup-To: Ed Maste , Barney Cordoba , Scott Long , current@freebsd.org References: <20090318150721.U22014@pooker.samsco.org> <976309.24341.qm@web63902.mail.re1.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <976309.24341.qm@web63902.mail.re1.yahoo.com> User-Agent: Mutt/1.4.2.1i X-OriginalArrivalTime: 23 Mar 2009 15:23:36.0753 (UTC) FILETIME=[56127210:01C9ABCB] 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: Tue, 24 Mar 2009 15:55:58 -0000 On Sun, Mar 22, 2009 at 03:06:52PM -0700, Barney Cordoba wrote: > I set up a little task that basically does: > > foo_task(){ > > while(1){ > foo_doreceive(); > pause("foo",1); > } > > } > > which wakes hz times per second in 7 and hz/2 times per second in > 8. The same accounting issue exists for this case, as I have it bridging > 400K pps and usage shows 0 most of the time. I've added some firewall > rules which should substantially increase the load, but still no usage. > If I really hammer it, like 600Kpps, it starts registering 30% usage, > with no ramp up in between. I suppose it could be just falling out of the > cache or something, but it doesn't seem realistic. > > Is there some hack I can implement to make sure a task is > accounted for, or some other way to monitor its usage? There are aliasing issues caused by driving the scheduler and the stat clock from the same source. It's particularly bad in our environment at work, so we reverted the clock sharing, and went back to using the i8254 for stats. If you're interested in giving this a try, I've posted the patch at . This is against 6.1 and might have some other minor changes, but the diff is small enough that you could easily apply it by hand as well. If you do try it out let me know what you find. -Ed