From owner-freebsd-current@FreeBSD.ORG Fri Apr 30 08:52:09 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F3DE816A4CE for ; Fri, 30 Apr 2004 08:52:08 -0700 (PDT) Received: from smtp.omnis.com (smtp.omnis.com [216.239.128.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id AC4F143D4C for ; Fri, 30 Apr 2004 08:52:08 -0700 (PDT) (envelope-from wes@softweyr.com) Received: from softweyr.homeunix.net (24-161-166-146.san.rr.com [24.161.166.146]) by smtp-relay.omnis.com (Postfix) with ESMTP id 8395B100492; Fri, 30 Apr 2004 08:52:04 -0700 (PDT) From: Wes Peters Organization: Softweyr.COM To: freebsd-current@freebsd.org Date: Fri, 30 Apr 2004 08:52:04 -0700 User-Agent: KMail/1.6.1 References: <7432.1083333726@critter.freebsd.dk> In-Reply-To: <7432.1083333726@critter.freebsd.dk> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200404300852.04723.wes@softweyr.com> X-Mailman-Approved-At: Sat, 01 May 2004 04:59:37 -0700 cc: Poul-Henning Kamp cc: "M. Warner Losh" Subject: Re: DEVFS in a chroot? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Apr 2004 15:52:09 -0000 On Friday 30 April 2004 07:02, Poul-Henning Kamp wrote: > In message <20040430.075448.70646001.imp@bsdimp.com>, "M. Warner Losh" writes: > >In message: <6695.1083331489@critter.freebsd.dk> > > > > "Poul-Henning Kamp" writes: > >: In message <20040430.070341.26991317.imp@bsdimp.com>, "M. Warner Losh" writes: > >: >In message: <5473.1083327210@critter.freebsd.dk> > >: > > >: > "Poul-Henning Kamp" writes: > >: >: >Should I mount /var/chroot/dev as type devfs? > >: >: > >: >: Yes: > >: >: > >: >: mount -t devfs randomargument /var/chroot/dev > >: > > >: >What if I have hundreds of these chroots? We build our product > >: > inside a chroot right now and I'm worried what the overhead of > >: >mounting/unmounting this for every build would be... > >: > >: As far as I recall, our mountlist handling is not optimised for > >: hundreds of simultaneous mountpoints: we basically walk the list. > >: That said, I belive we only do so during the actual mount/unmount > >: operations, so I do not think there is a performance issue as such. > > > >Would the performance issues be mitigated by mounting/unmounting devfs > >all the time? Eg, only mount it while it is actively being used? > > I think you would actually make it worse that way... We do this on our build box -- mount and unmount both devfs and a read-only source directory, chroot, and build, as in: /usr/wes/products on /usr/obj/buildenvs/usr/wes/products/iamsrc (nullfs, local, read-only) devfs on /usr/obj/buildenvs/usr/wes/products/dev (devfs, local) And then unmount once the build has completed. We have 'chroot' and 'unmount' targets in the top-level makefile to get back into and out of the chroot as well. On 5.2.1, our build box hangs once or twice a week on an unmount. I'm not sure if it's the nullfs or the devfs unmount. I haven't had time to debug this, I've been ankle deep (head first) in PHP and Perl code that are the guts of my product for 6 weeks now, but I'll try to catch it in the debugger next week once the smoke clears. I run -CURRENT on my workstation and it has not hung in a while, but it doesn't get pounded the way the buildbox does. Is there some resource related to mounts that might be getting leaked? -- Where am I, and what am I doing in this handbasket? Wes Peters wes@softweyr.com