From owner-freebsd-current Thu Jul 2 12:30:23 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id MAA23119 for freebsd-current-outgoing; Thu, 2 Jul 1998 12:30:23 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from ns1.yes.no (ns1.yes.no [195.119.24.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id MAA23112 for ; Thu, 2 Jul 1998 12:30:14 -0700 (PDT) (envelope-from eivind@bitbox.follo.net) Received: from bitbox.follo.net (bitbox.follo.net [195.204.143.218]) by ns1.yes.no (8.8.7/8.8.7) with ESMTP id TAA02928; Thu, 2 Jul 1998 19:30:13 GMT Received: (from eivind@localhost) by bitbox.follo.net (8.8.8/8.8.6) id VAA18271; Thu, 2 Jul 1998 21:30:12 +0200 (MET DST) Message-ID: <19980702213011.35162@follo.net> Date: Thu, 2 Jul 1998 21:30:11 +0200 From: Eivind Eklund To: Kevin Day , Andreas Klemm Cc: current@FreeBSD.ORG Subject: Re: -current wishlist References: <19980702102856.A11204@klemm.gtn.com> <199807021520.KAA18837@home.dragondata.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.89.1i In-Reply-To: <199807021520.KAA18837@home.dragondata.com>; from Kevin Day on Thu, Jul 02, 1998 at 10:20:51AM -0500 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, Jul 02, 1998 at 10:20:51AM -0500, Kevin Day wrote: > > On Wed, Jul 01, 1998 at 10:22:08PM -0500, Kevin Day wrote: > > > > > > I don't know if there's a Santa Claus on -current right now, but I've got a > > > few suggestions/weak spots I see in -current now, and would be more than > > > willing to help anyone wanting to work on these. I'm not that deep into the > > > mysteries of the kernel to just do it myself, but I'm a willing test > > > subject. :) > > > [...] > > > 5) Fix ccd under SMP > > > [...] > > > > What problems ? > > > > I get random 'Page fault while in kernel mode', then lockups before I can do > a trace. Seperating the two drives into non-ccd paritions makes it go away, > adding them back as a ccd drive starts it again.. Is it just me? :) These fix a couple of reasons for such problems, I think. They're completely untested. Feel free to test them :-) They're part of a large fix-set I've got; unfortunately, the (commercial) tools I use to find problems require a lot of 'pointless' changes, including error control comments. This means that extracting individual fixes such as the below can be quite a bit of work, and committing the 'pointless' changes has been deemed deterimental to everybody that don't have the tools... Index: ccd.c =================================================================== RCS file: /home/ncvs/src/sys/dev/ccd/ccd.c,v retrieving revision 1.32 diff -u -r1.32 ccd.c --- ccd.c 1998/03/09 20:39:26 1.32 +++ ccd.c 1998/05/31 01:10:56 @@ -427,7 +433,7 @@ printf("ccd%d: interleave must be at least %d\n", ccd->ccd_unit, (maxsecsize / DEV_BSIZE)); #endif - while (ci >= cs->sc_cinfo) { + while (ci && ci >= cs->sc_cinfo) { free(ci->ci_path, M_DEVBUF); ci--; } @@ -792,14 +801,16 @@ rcount = cbp[0]->cb_buf.b_bcount; if ((cbp[0]->cb_buf.b_flags & B_READ) == 0) cbp[0]->cb_buf.b_vp->v_numoutput++; - VOP_STRATEGY(&cbp[0]->cb_buf); + /* XXX VOP_STRATEGY can fail - add error checking? */ + (void)VOP_STRATEGY(&cbp[0]->cb_buf); if (cs->sc_cflags & CCDF_MIRROR && (cbp[0]->cb_buf.b_flags & B_READ) == 0) { /* mirror, start another write */ cbp[1]->cb_buf.b_vp->v_numoutput++; - VOP_STRATEGY(&cbp[1]->cb_buf); + /* XXX VOP_STRATEGY can fail - add error checking? */ + (void)VOP_STRATEGY(&cbp[1]->cb_buf); } bn += btodb(rcount); addr += rcount; } } @@ -918,7 +929,8 @@ #endif cb[0] = cbp; if (cs->sc_cflags & CCDF_MIRROR && - (cbp->cb_buf.b_flags & B_READ) == 0) { + (cbp->cb_buf.b_flags & B_READ) == 0 + && ci2) { /* mirror, start one more write */ cbp = getccdbuf(); bzero(cbp, sizeof (struct ccdbuf)); Eivind. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message