From owner-freebsd-stable@FreeBSD.ORG Mon Apr 11 05:34:47 2005 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 81E7716A4CE for ; Mon, 11 Apr 2005 05:34:47 +0000 (GMT) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7345443D39 for ; Mon, 11 Apr 2005 05:34:42 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.254.11] (junior-wifi.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.1/8.13.1) with ESMTP id j3B5c9l4028563; Sun, 10 Apr 2005 23:38:10 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <425A0BB2.10704@samsco.org> Date: Sun, 10 Apr 2005 23:31:30 -0600 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050218 X-Accept-Language: en-us, en MIME-Version: 1.0 To: David Sze References: <4257F20C.70004@samsco.org> <6.2.1.2.2.20050411005214.065dc018@mail.distrust.net> In-Reply-To: <6.2.1.2.2.20050411005214.065dc018@mail.distrust.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.8 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on pooker.samsco.org cc: Anthony Downer cc: stable@freebsd.org cc: mb@imp.ch Subject: Re: [PATCH] Stability fixes for IPS driver for 4.x X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2005 05:34:47 -0000 David Sze wrote: > At 09:17 AM 09/04/2005 -0600, Scott Long wrote this to All: > >> All, >> >> Thanks to the keen eye of David Sze, the cause of the instability in >> the ips driver in FreeBSD 4.x might have been found. If it's >> affecting you, >> please try the attached patch and let me know the results. I'll >> commit it when everyone is happy with it. > > > Scott, > > I think there's a problem with the ips_commands.c patch. After the > bufq_first call succeeds, bufq_remove must be called before the splx or > else the iobuf can get issued twice. However, if the subsequent > ips_get_free_cmd fails, the iobuf must be put back on the bufq. Yes, I forgot that synchronization is a bit different here than in 5.x/6.0. Your second patch with the MfC is exactly what I had in mind for the ips_start_io_request() function. > > Two patches are attached to this message: > > 1. ips.RELENG_4.stability.patch is just the stability patch as described. > > 2. ips.RELENG_4.mfc-and-stability.patch is an MFC of your IPS cleanup > and optimization that you committed to HEAD on 01/28/05, plus the > stability patch as described. > > Both patches survived a "make -j8 buildworld" for me. > > The problem I'm having now is that ips does not appear to be PAE-ified. > With either patch the bus_dmamap_create call fails. Any pointers would > be appreciated, this is new territory for me. > Making a driver PAE-ified means either teaching it to do 64-bit scatter-gather (assuming that the peripheral hardware can do this and that it's documented), or teaching the driver to correctly handle EINPROGRESS from bus_dmamap_load() along with using the proper busdma tag limits. The strategy I took with 6.x/5.x was the second one since I didn't have good IPS docs in front of me and I wanted it follow the APIs correctly. I did test it with 8GB of memory and it performed correctly under load. I haven't taken a close enough look at your MFC patch to say for sure if it's correct or not. I'm not sure if I'll have time to take another look in the next few days, unfortunately. Is there any chance you could test 5.x/6.0 under load with PAE just to validate the assertion that it works correctly there? Thanks, Scott