From sec@ice.42.org  Wed May 23 16:10:47 2001
Return-Path: <sec@ice.42.org>
Received: from ice.42.org (ice.42.org [194.246.250.222])
	by hub.freebsd.org (Postfix) with ESMTP id 40BB937B423
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 23 May 2001 16:10:41 -0700 (PDT)
	(envelope-from sec@ice.42.org)
Received: by ice.42.org (Postfix, from userid 1000)
	id C3E5B2DC; Thu, 24 May 2001 01:10:39 +0200 (CEST)
Message-Id: <20010523231039.C3E5B2DC@ice.42.org>
Date: Thu, 24 May 2001 01:10:39 +0200 (CEST)
From: sec@ice.42.org
Reply-To: sec@ice.42.org
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: md(4) manpage enhancement
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         27599
>Category:       docs
>Synopsis:       md(4) manpage enhancement
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed May 23 16:20:01 PDT 2001
>Closed-Date:    Mon Jun 18 15:00:38 PDT 2001
>Last-Modified:  Mon Jun 18 15:00:47 PDT 2001
>Originator:     Stefan `Sec` Zehl
>Release:        FreeBSD 4.3-STABLE i386
>Organization:
>Environment:
System: FreeBSD ice 4.3-STABLE FreeBSD 4.3-STABLE #5: Mon May 21 23:19:31 CEST 2001 root@ice:/usr/export/obj/usr/export/src/sys/ICE i386


	
>Description:

I found out that the hard way that a malloc(9)-backed md(4) disk has a
certain maximum size. If you increase it beyond that, your system will
hang. (See discussion with phk, kern/27259).

I hope my manpage update (or something similar) can be added, so
other users won't run into the same problem.

>How-To-Repeat:
	
>Fix:

Add this note to the manpage.

--- /usr/export/src/share/man/man4/md.4	Sun Dec 31 03:11:56 2000
+++ ./md.4	Thu May 24 00:56:57 2001
@@ -59,6 +59,11 @@
 with the kernel option
 .Dv MD_NSECT .
 .Pp
+Be warned that due to kernel constraints such a
+.Nm
+disk cannot be bigger than a certain maximum size.
+This size can be found in the 'Limit' column of 'vmstat -m'.
+.Pp
 At boot time the
 .Nm
 driver will search for pre-loaded modules of type

>Release-Note:
>Audit-Trail:

From: Dima Dorfman <dima@unixfreak.org>
To: sec@ice.42.org
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: docs/27599: md(4) manpage enhancement 
Date: Wed, 23 May 2001 20:57:23 -0700

 sec@ice.42.org writes:
 > --- /usr/export/src/share/man/man4/md.4	Sun Dec 31 03:11:56 2000
 > +++ ./md.4	Thu May 24 00:56:57 2001
 > @@ -59,6 +59,11 @@
 >  with the kernel option
 >  .Dv MD_NSECT .
 >  .Pp
 > +Be warned that due to kernel constraints such a
 > +.Nm
 > +disk cannot be bigger than a certain maximum size.
 > +This size can be found in the 'Limit' column of 'vmstat -m'.
 > +.Pp
 
 It looks to me like the man page already states this:
 
      The default maximum size of a md disk backed by malloc(9) is 20,000 sec-
      tors of 512 bytes each.  This can be changed with the kernel option
      MD_NSECT.
 
 Perhaps it might make sense to mention vmstat(8), but I don't think
 it's appropriate to add another paragraph, most of which just repeats
 what has already been said.
 
 					Dima Dorfman
 					dima@unixfreak.org
 
 
 >  At boot time the
 >  .Nm
 >  driver will search for pre-loaded modules of type
 > 
 > >Release-Note:
 > >Audit-Trail:
 > >Unformatted:
 > 
 > To Unsubscribe: send mail to majordomo@FreeBSD.org
 > with "unsubscribe freebsd-doc" in the body of the message
 > 

From: Stefan `Sec` Zehl <sec@42.org>
To: Dima Dorfman <dima@unixfreak.org>
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: docs/27599: md(4) manpage enhancement
Date: Thu, 24 May 2001 11:00:50 +0200

 On Wed, May 23, 2001 at 08:57:23PM -0700, Dima Dorfman wrote:
 > sec@ice.42.org writes:
 > > --- /usr/export/src/share/man/man4/md.4	Sun Dec 31 03:11:56 2000
 > > +++ ./md.4	Thu May 24 00:56:57 2001
 > > @@ -59,6 +59,11 @@
 > >  with the kernel option
 > >  .Dv MD_NSECT .
 > >  .Pp
 > > +Be warned that due to kernel constraints such a
 > > +.Nm
 > > +disk cannot be bigger than a certain maximum size.
 > > +This size can be found in the 'Limit' column of 'vmstat -m'.
 > > +.Pp
 > 
 > It looks to me like the man page already states this:
 > 
 >      The default maximum size of a md disk backed by malloc(9) is 20,000 sec-
 >      tors of 512 bytes each.  This can be changed with the kernel option
 >      MD_NSECT.
 > 
 > Perhaps it might make sense to mention vmstat(8), but I don't think
 > it's appropriate to add another paragraph, most of which just repeats
 > what has already been said.
 
 I'm sorry, but you misunderstand. The problem I mention has nothing to
 do with MD_NSECT. You can raise MD_NSECT all the way, but the mentioned
 'Limit' column of 'vmstat -m' Is unaffected by that. That is exactly
 where this comes from. The default MD_NSECT is small enough to avoid any
 problems, but when you increase it, you run into that other, not yet
 documented limit which will HANG your machine.
 If my english isn't clear enough, feel free to improve it. But please
 add a warning to the manpage.
 
 CU,
     Sec
 -- 
 There are too many priorities. One has to prioritize priorities. -- Wietse

From: Dima Dorfman <dima@unixfreak.org>
To: Stefan `Sec` Zehl <sec@42.org>
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: docs/27599: md(4) manpage enhancement 
Date: Sat, 16 Jun 2001 15:52:52 -0700

 Stefan `Sec` Zehl <sec@42.org> writes:
 > On Wed, May 23, 2001 at 08:57:23PM -0700, Dima Dorfman wrote:
 > > sec@ice.42.org writes:
 > > > --- /usr/export/src/share/man/man4/md.4	Sun Dec 31 03:11:56 2000
 > > > +++ ./md.4	Thu May 24 00:56:57 2001
 > > > @@ -59,6 +59,11 @@
 > > >  with the kernel option
 > > >  .Dv MD_NSECT .
 > > >  .Pp
 > > > +Be warned that due to kernel constraints such a
 > > > +.Nm
 > > > +disk cannot be bigger than a certain maximum size.
 > > > +This size can be found in the 'Limit' column of 'vmstat -m'.
 > > > +.Pp
 > > 
 > > It looks to me like the man page already states this:
 > > 
 > >      The default maximum size of a md disk backed by malloc(9) is 20,000 se
 > c-
 > >      tors of 512 bytes each.  This can be changed with the kernel option
 > >      MD_NSECT.
 > > 
 > > Perhaps it might make sense to mention vmstat(8), but I don't think
 > > it's appropriate to add another paragraph, most of which just repeats
 > > what has already been said.
 > 
 > I'm sorry, but you misunderstand. The problem I mention has nothing to
 > do with MD_NSECT. You can raise MD_NSECT all the way, but the mentioned
 > 'Limit' column of 'vmstat -m' Is unaffected by that. That is exactly
 > where this comes from. The default MD_NSECT is small enough to avoid any
 > problems, but when you increase it, you run into that other, not yet
 > documented limit which will HANG your machine.
 > If my english isn't clear enough, feel free to improve it. But please
 > add a warning to the manpage.
 
 Okay, I did misunderstand.  But it still says what you want:
 
      The malloc(9) backed disks are severely limited in size by constraints
      imposed by malloc(9).  The limit imposed depends on the amount of physi-
      cal RAM in the machine, and covers all malloc(9) backed instances of md
      devices.
 
 but perhaps that could do with some elaboraton.  How about this:
 
      The malloc(9) backed disks are severely limited in size by constraints
      imposed by malloc(9).  Specifically, only one malloc bucket s used, which
      means that all md devices with malloc(9) backing must share the malloc
      per-bucket quota.  The exact size of this quota varies, in particuar with
      the amount of RAM in the system.  The exact value can be determined with
      vmstat(8).
 
 
 > 
 > CU,
 >     Sec
 > -- 
 > There are too many priorities. One has to prioritize priorities. -- Wietse
 > 

From: Stefan `Sec` Zehl <sec@42.org>
To: Dima Dorfman <dima@unixfreak.org>
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: docs/27599: md(4) manpage enhancement
Date: Sun, 17 Jun 2001 22:56:45 +0200

 On Sat, Jun 16, 2001 at 03:52:52PM -0700, Dima Dorfman wrote:
 > Okay, I did misunderstand.  But it still says what you want:
 > 
 >      The malloc(9) backed disks are severely limited in size by constraints
 >      imposed by malloc(9).  The limit imposed depends on the amount of physi-
 >      cal RAM in the machine, and covers all malloc(9) backed instances of md
 >      devices.
 > 
 > but perhaps that could do with some elaboraton.  How about this:
 > 
 >      The malloc(9) backed disks are severely limited in size by constraints
 >      imposed by malloc(9).  Specifically, only one malloc bucket s used, which
 >      means that all md devices with malloc(9) backing must share the malloc
 >      per-bucket quota.  The exact size of this quota varies, in particuar with
 >      the amount of RAM in the system.  The exact value can be determined with
 >      vmstat(8).
 
 Yes, that sounds much better, thanks. Maybe alter the last sentence to
 "The exact value can be determined from the 'Limit' column of vmstat(8)"
 
 But you don't have to. Your suggestion would be fine for me, too.
 
 CU,
     Sec
 -- 
 I think the IDE issue is a good point.  People with IDE hardware in
 their machines should be punished by making them wait to boot...
                                                -- terry@lambert.org
State-Changed-From-To: open->closed 
State-Changed-By: dd 
State-Changed-When: Mon Jun 18 15:00:38 PDT 2001 
State-Changed-Why:  
Committed, thanks! 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=27599 
>Unformatted:
