From owner-freebsd-current@FreeBSD.ORG Thu Oct 9 08:04:25 2003 Return-Path: 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 11CBF16A4BF for ; Thu, 9 Oct 2003 08:04:25 -0700 (PDT) Received: from mail.sandvine.com (sandvine.com [199.243.201.138]) by mx1.FreeBSD.org (Postfix) with ESMTP id AC79143FBD for ; Thu, 9 Oct 2003 08:04:23 -0700 (PDT) (envelope-from don@sandvine.com) Received: by mail.sandvine.com with Internet Mail Service (5.5.2653.19) id <4CQ6MX1T>; Thu, 9 Oct 2003 11:04:22 -0400 Message-ID: From: Don Bowman To: 'Terry Lambert' , "Michael O. Boev" Date: Thu, 9 Oct 2003 11:04:14 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" cc: freebsd-current@FreeBSD.ORG Subject: RE: Why is em nic generating interrupts? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 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: Thu, 09 Oct 2003 15:04:25 -0000 From: Terry Lambert [mailto:tlambert2@mindspring.com] > "Michael O. Boev" wrote: > > I've got a [uniprocessor 5.1-RELEASE] router machine with > fxp and em nics. > > I've built my kernel with the following included: > > > > options DEVICE_POLLING > > options HZ=2500 > > > > and enabled polling in /etc/sysctl.conf. > [ ... ] > > What's happening? Is polling working in my case? > > If yes, why is vmstat showing interrupts? I see clearly, > > that fxp's counter doesn't increase, and em's is constantly growing. > > > > Is there anyone who knows for sure that em's polling works? > > You may want to ask Luigi; polling is his code. > > However, I believe the issue is that polling doesn't start > until you take an interrupt, and it stops as soon as there is > no more data to process, and waits for the next interrupt. > > If you were to jack your load way up, you would probably see > an increase in interrupts, then them dropping off dramatically. > > If all else fails, read the source code... 8-). FWIW, this works for me with 4.7. As terry says, you do see a couple of initial interrupts, as below, and then they stop. $ vmstat -i interrupt total rate em0 irq16 4 0 em1 irq17 4 0 ahc0 irq18 5653 0 ahc1 irq19 15 0 em2 irq20 4 0 mux irq21 3 0 sio0 irq4 1583 0 sio1 irq3 1 0 clk irq0 14545633 2501 rtc irq8 744224 128 Total 15297124 2631