From owner-freebsd-embedded@FreeBSD.ORG Thu Jul 5 20:12:34 2007 Return-Path: X-Original-To: freebsd-embedded@freebsd.org Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6E3AB16A468 for ; Thu, 5 Jul 2007 20:12:34 +0000 (UTC) (envelope-from lab@mailgate.gta.com) Received: from mailgate.gta.com (mailgate.gta.com [199.120.225.20]) by mx1.freebsd.org (Postfix) with SMTP id 0763C13C447 for ; Thu, 5 Jul 2007 20:12:33 +0000 (UTC) (envelope-from lab@mailgate.gta.com) Received: (qmail 74328 invoked by uid 1000); 5 Jul 2007 19:45:52 -0000 Date: Thu, 5 Jul 2007 15:45:52 -0400 From: Larry Baird To: freebsd-embedded@freebsd.org Message-ID: <20070705154552.A71825@gta.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Subject: Live lock with FreeBSD 6.2 and WRAP boards X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2007 20:12:34 -0000 First some history, we have been building firewalls based upon FreeBSD 4.x for several years. A few months back we switched to FreeBSD 6.x. Our software runs on a number of different hardware platforms. At the low end we are using WRAP boards (http://www.pcengines.ch/wrap.htm). As part of the QA process, manufacturing uses iperf during burnin. This worked great for FreeBSD 4.x based products. With 6.x, some of the WRAP based products would reboot during the testing. It was found that the the boxes had become so live locked that the watchdog timer wasn't getted tickled. For what its worth, watchdog is set to 32 seconds, One small change to the sis driver has helped a lot with this problem. Old code for sis_intr() began as below: SIS_LOCK(sc); #ifdef DEVICE_POLLING if (ifp->if_capenable & IFCAP_POLLING) { SIS_UNLOCK(sc); return; } #endif #endif We changed this to: #ifdef DEVICE_POLLING if (ifp->if_capenable & IFCAP_POLLING) { return; } #endif SIS_LOCK(sc); The 6.2 boxes are still a lot less reponsive than the 4.x boxes under load, but the removal of the lock/unlock in the polling interrupt path keeps them from falling over. The best I can tell, the only problem with removing the locking is that if polling was changed on an interface, a few packets might be processed incorrectly. Since the enabling/disabling of polling happens so seldom (for us never) the performance trade off is well worth it. Any thoughts on this change? Larry -- ------------------------------------------------------------------------ Larry Baird | http://www.gta.com Global Technology Associates, Inc. | Orlando, FL Email: lab@gta.com | TEL 407-380-0220, FAX 407-380-6080