From owner-freebsd-stable@FreeBSD.ORG Tue Apr 12 11:31:43 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 90B6716A4CE for ; Tue, 12 Apr 2005 11:31:43 +0000 (GMT) Received: from lonsmime04.rit.reuters.com (lonsmimeo.rit.reuters.com [192.165.213.23]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8229643D1D for ; Tue, 12 Apr 2005 11:31:42 +0000 (GMT) (envelope-from Anthony.Downer@reuters.com) Received: from eupig1 (unverified) by lonsmime04.rit.reuters.com (Content Technologies SMTPRS 4.3.17) with ESMTP id ; Tue, 12 Apr 2005 11:31:35 +0000 Message-ID: Received: from dtcsmsxb01.emea.ime.reuters.com ([10.5.150.13]) by eupig1.dtc.lon.ime.reuters.com (PMDF V6.1-1 #30693) with ESMTP id <0IEU0071Q00NWL@eupig1.dtc.lon.ime.reuters.com>; Tue, 12 Apr 2005 11:31:35 +0000 (GMT) Received: from lonsmsxm01.emea.ime.reuters.com ([10.5.150.14]) by dtcsmsxb01.emea.ime.reuters.com with Microsoft SMTPSVC (5.0.2195.6713); Tue, 12 Apr 2005 12:31:34 +0100 Date: Tue, 12 Apr 2005 12:31:33 +0100 From: Anthony Downer To: David Sze , Scott Long MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft Exchange V6.0.6521.0 Content-type: text/plain; charset="us-ascii" Content-transfer-encoding: quoted-printable Thread-Topic: [PATCH] Stability fixes for IPS driver for 4.x Thread-Index: AcU+VQcORrHgkb78SSeAZwxjnN8IDwA/Z0og Content-class: urn:content-classes:message X-MS-Has-Attach: X-MS-TNEF-Correlator: X-OriginalArrivalTime: 12 Apr 2005 11:31:34.0299 (UTC) FILETIME=[2E62CEB0:01C53F53] 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: Tue, 12 Apr 2005 11:31:43 -0000 Folks, I have patched and re-built the 4.11 kernel using the ips.RELENG_4.stability.patch. The IBM x342 with ServeRAID 4Lx now appears to work flawlessly, copying 500MB plus without a single error. Thank you both for your time and effort. Cheers, Anthony. -----Original Message----- From: David Sze [mailto:dsze@alumni.uwaterloo.ca]=20 Sent: 11 April 2005 06:12 To: Scott Long Cc: Anthony Downer; mb@imp.ch; stable@freebsd.org Subject: Re: [PATCH] Stability fixes for IPS driver for 4.x 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=20 >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=20 >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. 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. >Thanks, > >Scott > > >Index: ips_commands.c >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >RCS file: /usr/ncvs/src/sys/dev/ips/ips_commands.c,v >retrieving revision 1.11.6.1 >diff -u -r1.11.6.1 ips_commands.c >--- ips_commands.c 13 Jan 2005 00:46:40 -0000 1.11.6.1 >+++ ips_commands.c 9 Apr 2005 15:09:50 -0000 >@@ -162,8 +162,11 @@ > void ips_start_io_request(ips_softc_t *sc) > { > struct buf *iobuf; >+ int s > >+ s =3D splbio(); > iobuf =3D bufq_first(&sc->queue); >+ splx(s); > if(!iobuf) { > return; > } >@@ -171,8 +174,10 @@ > if(ips_get_free_cmd(sc, ips_send_io_request, iobuf, =20 >IPS_NOWAIT_FLAG)){ > return; > } >- >+ >+ s =3D splbio(); > bufq_remove(&sc->queue, iobuf); >+ splx(s); > return; > } > >Index: ips_disk.c >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >RCS file: /usr/ncvs/src/sys/dev/ips/ips_disk.c,v >retrieving revision 1.6.6.1 >diff -u -r1.6.6.1 ips_disk.c >--- ips_disk.c 13 Jan 2005 00:46:40 -0000 1.6.6.1 >+++ ips_disk.c 9 Apr 2005 15:07:50 -0000 >@@ -128,12 +128,15 @@ > static void ipsd_strategy(struct buf *iobuf) > { > ipsdisk_softc_t *dsc; >+ int s; > > dsc =3D iobuf->b_dev->si_drv1; > DEVICE_PRINTF(8,dsc->dev,"in strategy\n"); > devstat_start_transaction(&dsc->stats); > iobuf->b_driver1 =3D (void > *)(uintptr_t)dsc->sc->drives[dsc->disk_number].drivenum; >- bufqdisksort(&dsc->sc->queue, iobuf); >+ s =3D splbio(); >+ bufq_insert_tail(&dsc->sc->queue, iobuf); >+ splx(s); > ips_start_io_request(dsc->sc); } > ----------------------------------------------------------------- Visit our Internet site at http://www.reuters.com To find out more about Reuters Products and Services visit http://www.reute= rs.com/productinfo=20 Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Reuters Ltd.