From owner-freebsd-arch Mon Dec 11 19:10: 3 2000 From owner-freebsd-arch@FreeBSD.ORG Mon Dec 11 19:09:59 2000 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from rina.r.dl.itc.u-tokyo.ac.jp (rina.r.dl.itc.u-tokyo.ac.jp [133.11.199.247]) by hub.freebsd.org (Postfix) with ESMTP id D47BD37B400 for ; Mon, 11 Dec 2000 19:09:57 -0800 (PST) Received: from rina.r.dl.itc.u-tokyo.ac.jp (localhost [127.0.0.1]) by rina.r.dl.itc.u-tokyo.ac.jp (8.11.1+3.4Wpre/3.7W-rina.r-0.1-11.01.2000) with ESMTP id eBC39rC06587; Tue, 12 Dec 2000 12:09:55 +0900 (JST) Date: Tue, 12 Dec 2000 12:09:52 +0900 Message-ID: From: Seigo Tanimura To: tanimura@r.dl.itc.u-tokyo.ac.jp Cc: dillon@earth.backplane.com, bright@wintelcom.net, arch@FreeBSD.ORG Subject: Re: Even 1GB KVA is not enough, but we have no more space In-Reply-To: In your message of "Sat, 09 Dec 2000 14:24:06 +0900" <86elzi88w9.wl@silver.carrots.uucp.r.dl.itc.u-tokyo.ac.jp> References: <20001207013611.O16205@fw.wintelcom.net> <20001207015651.P16205@fw.wintelcom.net> <200012071952.eB7JqXm11711@earth.backplane.com> <86elzi88w9.wl@silver.carrots.uucp.r.dl.itc.u-tokyo.ac.jp> User-Agent: Wanderlust/1.1.1 (Purple Rain) SEMI/1.13.7 (Awazu) FLIM/1.13.2 (Kasanui) MULE XEmacs/21.1 (patch 12) (Channel Islands) (i386--freebsd) Organization: Digital Library Research Division, Information Techinology Centre, The University of Tokyo MIME-Version: 1.0 (generated by SEMI 1.13.7 - "Awazu") Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sat, 09 Dec 2000 14:24:06 +0900, Seigo Tanimura said: Seigo> And the saga continues. After regulating the size of struct swblock, Seigo> ffs_vget() failed to allocalte a new vnode. At the time the PowerEdge Seigo> failed, the kernel held around 197K vnodes, which is as large as Seigo> 46MB. This time I reduced the size of kmem_map, the pool of malloc(9). Sorry, please forget this matter. The culprit truned out to be a race condition of testing-and-setting ffs_inode_hash_lock in ffs_vget(). Mutexifing the test-and-sleep-or-set and wakeup-reset operations was enough to fix the problem. Now my kernel allocates up to 316K vnodes on make buildworld and release, so malloc(9) pool of 200MB is sufficient. (316K vnodes occupy about 90-100MB in kmem_map) The updated patch is now at URI: http://people.FreeBSD.org/~tanimura/patches/kvmfix.diff which includes A. adaptation of swap metadata size, B. rejection of swapon(2) upon failure of swap zone allocation, and C. atomic test-and-set and reset of {ffs,ifs}_inode_hash_lock. I am going to commit this patch in about 6 hours from now. -- Seigo Tanimura To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message