From owner-freebsd-stable Mon Jan 7 21:41:27 2002 Delivered-To: freebsd-stable@freebsd.org Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by hub.freebsd.org (Postfix) with ESMTP id C6F7C37B416; Mon, 7 Jan 2002 21:41:23 -0800 (PST) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.11.6/8.11.6) with ESMTP id g085d3Y13956; Tue, 8 Jan 2002 06:39:04 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: Michael Smith Cc: Dan Moschuk , stable@freebsd.org Subject: Re: Hang in md driver In-Reply-To: Your message of "Mon, 07 Jan 2002 12:26:30 PST." <200201072026.g07KQUX01267@mass.dis.org> Date: Tue, 08 Jan 2002 06:39:03 +0100 Message-ID: <13954.1010468343@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG malloc(9) should be fixed to report "I can't and I'll probably never be able to" even in the M_WAITOK case. In message <200201072026.g07KQUX01267@mass.dis.org>, Michael Smith writes: > >This doesn't seem to address the problem; md(4) shouldn't hang when it >runs out of memory. > >> >From md(4): >> >> malloc Backing store is allocated using malloc(9). Only one malloc- >> bucket is used, which means that all md devices with malloc >> backing must share the malloc-per-bucket-quota. The exact size >> of this quota varies, in particular with the amount of RAM in >> the system. The exact value can be determined with vmstat(8). >> >> >> In message <20020107141157.A1759@spirit.jaded.net>, Dan Moschuk writes: >> > >> >I can reproduce a hang in the md driver reliably. >> > >> >Setup: >> > >> >dd if=/dev/zero of=image bs=32k count=8k >> >vnconfig -s labels -c vn0 image >> >diskabel -r -w vn0 auto >> >newfs vn0c >> > >> >dd if=image of=/dev/md0 bs=32k count=8k >> >mount /dev/md0c /mnt >> > >> >This works as expected. >> > >> >If I run bonnie against /mnt with a 64M filesize, everything is fine. >> >However, once I up that size to 128M it will hang half way through. >> > >> >Using an mfs partition instead yields no problems. >> > >> >I've tested this against a 4.3 (512M ram) and a 4.4 (1.5GB ram) boxes >> >respectively and both are affected. top says the bonnie process is in the >> >"MD sec" state. >> > >> >Cheers, >> >-Dan >> > >> >> -- >> Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 >> phk@FreeBSD.ORG | TCP/IP since RFC 956 >> FreeBSD committer | BSD since 4.3-tahoe >> Never attribute to malice what can adequately be explained by incompetence. >> >> To Unsubscribe: send mail to majordomo@FreeBSD.org >> with "unsubscribe freebsd-stable" in the body of the message > > > -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message