NetBSD Problem Report #9868

Received: (qmail 20848 invoked from network); 13 Apr 2000 15:49:38 -0000
Message-Id: <200004132349.QAA01008@paris.lip6.fr>
Date: Thu, 13 Apr 2000 16:49:30 -0700 (PDT)
From: Manuel.Bouyer@lip6.fr
Reply-To: Manuel.Bouyer@lip6.fr
To: gnats-bugs@gnats.netbsd.org
Subject: raidframe misbehaves with MAXPHYS
X-Send-Pr-Version: 3.95

>Number:         9868
>Category:       kern
>Synopsis:       raidframe misbehaves with MAXPHYS
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    oster
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Apr 13 15:50:01 +0000 2000
>Closed-Date:    Sat Sep 23 22:33:19 +0000 2006
>Last-Modified:  Sat Sep 23 22:33:19 +0000 2006
>Originator:     Manuel Bouyer
>Release:        -current as of last week
>Organization:
	LIP6/RP
>Environment:

System: NetBSD paris 1.4X NetBSD 1.4X (HERA) #8: Thu Apr 13 12:46:26 PDT 2000 root@paris:/usr/src/sys/arch/i386/compile/HERA i386

/etc/raid0.conf:
START array
1 4 0
START disks
/dev/sd1e
/dev/sd2e
/dev/sd4e
/dev/sd5e
START layout
512 1 1 5
START queue
fifo 100

>Description:
	Setting up a RAID5 array with SectPerSU > maxphys (currently 64k)
	causes various misbehavior. I didn't analyse deeply the situation
	bus it seems that I/O with size > MAXPHYS are passed to the
	underlying device:
	ncr1: unable to load xfer DMA map, error = 22
	ncr1: unable to load xfer DMA map, error = 22
	ncr0: unable to load xfer DMA map, error = 22
	ncr0: unable to load xfer DMA map, error = 22
	(error 22 being EINVAL). I got these messages while issuing
	a 'raidctl -i'. Attempting to unconfigure the RAID will cause
	a panic.
>How-To-Repeat:
	setup a RAID with SectPerSU > 128 (=64k with 512-bytes sectors)
	and try to use it.
>Fix:
	I'm not sure RAIDframe should support such configs (I tried this
	while benchmarking a RAID5 stripe, and I'm not sure this would have
	improved performances vs SectPerSU=128), but in this case the
	configuration of the RAID should definitevy fail; and not create
	loosages later.
>Release-Note:
>Audit-Trail:

From: Tim Rightnour <root@garbled.net>
To: Manuel.Bouyer@lip6.fr
Cc: gnats-bugs@gnats.netbsd.org
Subject: RE: kern/9868: raidframe misbehaves with MAXPHYS
Date: Thu, 13 Apr 2000 10:25:57 -0700 (MST)

 On 13-Apr-00 Manuel.Bouyer@lip6.fr wrote:
 >         I'm not sure RAIDframe should support such configs (I tried this
 >         while benchmarking a RAID5 stripe, and I'm not sure this would have
 >         improved performances vs SectPerSU=128), but in this case the
 >         configuration of the RAID should definitevy fail; and not create
 >         loosages later.

 Just FYI- I have tested SectPerSU sizes on my alpha w/ a BHA controller from 16
 up to 216, and never had a problem.  These were 7 disk raids.

 ---
 Tim Rightnour <root@garbled.net>
 NetBSD: Free multi-architecture OS http://www.netbsd.org/
 NetBSD Mailing lists on the web: http://mail-index.netbsd.org/

From: Manuel Bouyer <bouyer@antioche.lip6.fr>
To: Tim Rightnour <root@garbled.net>
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: kern/9868: raidframe misbehaves with MAXPHYS
Date: Thu, 13 Apr 2000 20:46:27 +0200

 On Thu, Apr 13, 2000 at 10:25:57AM -0700, Tim Rightnour wrote:
 > 
 > On 13-Apr-00 Manuel.Bouyer@lip6.fr wrote:
 > >         I'm not sure RAIDframe should support such configs (I tried this
 > >         while benchmarking a RAID5 stripe, and I'm not sure this would have
 > >         improved performances vs SectPerSU=128), but in this case the
 > >         configuration of the RAID should definitevy fail; and not create
 > >         loosages later.
 > 
 > Just FYI- I have tested SectPerSU sizes on my alpha w/ a BHA controller from 16
 > up to 216, and never had a problem.  These were 7 disk raids.

 I tried 265 and it worked. The problem isn't that simple then ...
 but I'm pretty sure that the ncr failed because it got a request bigger than
 64k.

 --
 Manuel Bouyer, LIP6, Universite Paris VI.           Manuel.Bouyer@lip6.fr
 --
Responsible-Changed-From-To: kern-bug-people->oster 
Responsible-Changed-By: oster 
Responsible-Changed-When: Sat Apr 15 20:27:54 PDT 2000 
Responsible-Changed-Why:  
"Pick me" for RAIDframe problems. 

From: Greg Oster <oster@cs.usask.ca>
To: Manuel.Bouyer@lip6.fr
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: kern/9868: raidframe misbehaves with MAXPHYS
Date: Sat, 15 Apr 2000 21:51:09 -0600

 Hi Guys

 So I thought I had this completely under controll untill I went to mark 
 this as 'fixed', and then saw the other comments in the PR :(

 Tim said:
 > Just FYI- I have tested SectPerSU sizes on my alpha w/ a BHA controller
 > from 16 up to 216, and never had a problem.  These were 7 disk raids.

 Does this testing include doing parity re-writes (raidctl -i) ?

 Manuel then said:
 > I tried 265 and it worked. The problem isn't that simple then ...
 > but I'm pretty sure that the ncr failed because it got a request bigger than
 > 64k.

 Again, did 265 work when doing parity re-writes?  

 I put a "fix" in to limit the sectPerSU to < MAXPHYS, but I want to 
 double-check your comments here before I close this PR (I saw the error on 
 my test box with both NCR and Adaptec, but *only* with raidctl -i)

 (The parity re-write part is key here -- since RAIDframe only reads as much 
 parity as it has to, and MAXPHYS is the most data RAIDframe will ever see, 
 RAIDframe will only write at most MAXPHYS to underlying drivers under normal 
 IO load.  Under a parity re-write, however, RAIDframe apparently tries to 
 write as much as it can, and that's where this problem shows up...  If/when
 MAXPHYS goes away, we won't have to worry about this problem, but that won't 
 happen till after 1.5 (if it even happens..))

 Thanks.

 Later...

 Greg Oster



From: Manuel Bouyer <bouyer@antioche.lip6.fr>
To: Greg Oster <oster@cs.usask.ca>
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: kern/9868: raidframe misbehaves with MAXPHYS
Date: Sun, 16 Apr 2000 15:15:58 +0200

 On Sat, Apr 15, 2000 at 09:51:09PM -0600, Greg Oster wrote:
 > 
 > Manuel then said:
 > > I tried 265 and it worked. The problem isn't that simple then ...
 > > but I'm pretty sure that the ncr failed because it got a request bigger than
 > > 64k.
 > 
 > Again, did 265 work when doing parity re-writes?  

 Hum, typo, it was 256, really.
 Yes, it worked with a raidctl -i. I can double-check if you want.

 > [...]
 > 
 > (The parity re-write part is key here -- since RAIDframe only reads as much 
 > parity as it has to, and MAXPHYS is the most data RAIDframe will ever see, 
 > RAIDframe will only write at most MAXPHYS to underlying drivers under normal 
 > IO load.  Under a parity re-write, however, RAIDframe apparently tries to 
 > write as much as it can, and that's where this problem shows up...  If/when
 > MAXPHYS goes away, we won't have to worry about this problem, but that won't 
 > happen till after 1.5 (if it even happens..))

 Dropping MAXPHYS is really not easy, a lot of underlying drivers need a
 upper bound to pre-allocate buffer, DMA maps, scatter/gather structures,
 etc ... This can be done dynamically, but the overhead may be measurable.

 Howver I'd like to see MAXPHYS bumped to a larger value.

 --
 Manuel Bouyer <bouyer@antioche.eu.org>
 --
State-Changed-From-To: open->closed
State-Changed-By: tls@netbsd.org
State-Changed-When: Sat, 23 Sep 2006 22:33:19 +0000
State-Changed-Why:
The fix evidently works though it is suboptimal.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.