Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Jul 2007 15:45:52 -0400
From:      Larry Baird <lab@gta.com>
To:        freebsd-embedded@freebsd.org
Subject:   Live lock with FreeBSD 6.2 and WRAP boards
Message-ID:  <20070705154552.A71825@gta.com>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070705154552.A71825>