From owner-freebsd-current@FreeBSD.ORG Sat Oct 11 06:45:58 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 0931E16A4B3 for ; Sat, 11 Oct 2003 06:45:58 -0700 (PDT) Received: from isrv.tric.tomsk.gov.ru (isrv.tric.tomsk.gov.ru [213.183.106.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4871C43FAF for ; Sat, 11 Oct 2003 06:45:55 -0700 (PDT) (envelope-from mike@tric.tomsk.gov.ru) Received: from draco (m266827.dialup.sobes [192.168.7.32]) (authenticated bits=0)h9BDjbPp085268 for ; Sat, 11 Oct 2003 20:45:41 +0700 (NOVST) (envelope-from mike@tric.tomsk.gov.ru) Message-ID: <000f01c38ffd$fddfdb30$2007a8c0@draco> From: "Michael O. Boev" To: References: <12974590.1065819295600.JavaMail.root@wamui06.slb.atl.earthlink.net> Date: Sat, 11 Oct 2003 20:45:49 +0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Virus-Scanned: by amavisd-new 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: Sat, 11 Oct 2003 13:45:58 -0000 ----- Original Message ----- From: "Terry Lambert" To: "Michael O. Boev" ; "Terry Lambert" Cc: Sent: Saturday, October 11, 2003 3:54 AM Subject: RE: Why is em nic generating interrupts? > Michael O. Boev wrote: > > 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. > > To this dare I object, that there is traffic going through this machine, > > and fxp0 is NOT generating interrupts, while em IS. So, if the rule above > > works, they both have to behave in same ways. > > This is the third time I've received this message. I guess you feel some > urgency about receiving a reply? Oh, no )). I even didn't send it for 3 times. Sorry for annoyance. > > My answer is this: I did the polling code for a number of the drivers, and > though it was committed by someone else, I can guarantee you that it > will have interrupts, unless the code was implemented incorreectly, since > the code is meant to do this polling only under heavy load. I believe you... I just wondered why two drivers behaved differently. ... > If your FXP is not generating any interrupts at all, i think that the polling > code in it is probably broken. > > Note: I believe this might be one of the ones I modified, since Luigi's code > originally only dealt with Gigabit NICs, though I may be mistaken. If so, > my statement that it's broken should be considered to be pretty > authoritative. 8-). Then, OK, it is now fxp's polling that probably behaves oddly :)). Since I've ever been only using fxps, I got used to this behaviour. Thus my questions. > > -- Terry > Thanks for thorough explanations! Mike.