From owner-freebsd-net@FreeBSD.ORG Thu Jan 29 10:10:37 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 A724616A4CE for ; Thu, 29 Jan 2004 10:10:37 -0800 (PST) Received: from mail.sandvine.com (sandvine.com [199.243.201.138]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2854243D39 for ; Thu, 29 Jan 2004 10:10:36 -0800 (PST) (envelope-from don@sandvine.com) Received: by mail.sandvine.com with Internet Mail Service (5.5.2657.72) id ; Thu, 29 Jan 2004 13:10:35 -0500 Message-ID: From: Don Bowman To: 'Kevin Day' , Vlad Galu Date: Thu, 29 Jan 2004 13:10:30 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2657.72) Content-Type: text/plain; charset="iso-8859-1" cc: freebsd-net@freebsd.org Subject: RE: DEVICE_POLLING with SMP 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: Thu, 29 Jan 2004 18:10:37 -0000 > From: Kevin Day [mailto:toasty@dragondata.com] > On Jan 29, 2004, at 1:04 AM, Vlad Galu wrote: > > > > I see no reason for it. Having to switch between multiple kernel > > threads to handle polling may bring too much overhead. > > > > > > Would that really be happening though? > > If polling is happening in the idle loop, extra overhead > doesn't really > matter all that much, the CPU is idle, and I can't imagine it > being any > worse during a livelock inducing amount of traffic. > > If it's polling during any other time, the code is exactly the same > between the UP and SMP case, and I can't imagine the overhead > being all > THAT much worse, would it? > > My primary goal with it is to stop thrashing context switches > when I've > got a system acting as a router with 8 network interfaces on it. Even > with network card interrupt coalescing there is a whole lot of > interrupt activity going on, which polling seems to make a noticeable > difference with polling enabled. I'm also very interested in > polling's > ability to more gracefully handle extremely heavy network traffic > without getting into livelock, which may be worth it to some people > prone to DoS activity when they have a whole lot of bandwidth to deal > with. > > I'd be willing to chip in a few bucks for development time if anyone > wants to make the changes to try it out. It didn't look that > difficult, > but my time is pretty booked right now. > > -- Kevin On 4.X, you can simply comment out the check for device polling and MP operation. The system will now work fine. It will not, however, poll on idle. We are running this way and it works very well. Polling on idle for MP requires a bit more work. If you do that work, you will have some locking issues to solve. I have not tried this on current yet. --don