From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 29 16:31:59 2006 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1724016A40F for ; Sun, 29 Oct 2006 16:31:59 +0000 (UTC) (envelope-from matt@gsicomp.on.ca) Received: from daisy2.compar.com (daisy2.compar.com [216.208.38.133]) by mx1.FreeBSD.org (Postfix) with ESMTP id 48C6143D69 for ; Sun, 29 Oct 2006 16:31:44 +0000 (GMT) (envelope-from matt@gsicomp.on.ca) Received: from localhost (localhost.compar.com [127.0.0.1]) by daisy2.compar.com (Postfix) with ESMTP id DB15513C48C; Sun, 29 Oct 2006 11:24:25 -0500 (EST) Received: from unknown by localhost (amavisd-new, unix socket) id client-HzwRvAs3; Sun, 29 Oct 2006 11:24:23 -0500 (EST) Received: from gabby.gsicomp.on.ca (CPE00062566c7bb-CM0011e6ede298.cpe.net.cable.rogers.com [72.56.73.77]) by daisy2.compar.com (Postfix) with ESMTP id 1F28213C481; Sun, 29 Oct 2006 11:24:22 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by gabby.gsicomp.on.ca (Postfix) with ESMTP id 56C626128; Sun, 29 Oct 2006 12:16:14 -0500 (EST) Received: from unknown by localhost (amavisd-new, unix socket) id client-IUFGKsNj; Sun, 29 Oct 2006 12:15:58 -0500 (EST) Received: from hermes (hermes.gsicomp.on.ca [192.168.0.18]) by gabby.gsicomp.on.ca (Postfix) with ESMTP id 8E81760F6; Sun, 29 Oct 2006 12:15:58 -0500 (EST) Message-ID: <006801c6fb77$e4e30100$1200a8c0@gsicomp.on.ca> From: "Matt Emmerton" To: "David Malone" , "Yar Tikhiy" References: <20061029140716.GA12058@comp.chem.msu.su> <20061029152227.GA11826@walton.maths.tcd.ie> Date: Sun, 29 Oct 2006 11:32:58 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1807 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1807 X-Virus-Scanned: amavisd-new at gsicomp.on.ca X-Virus-Scanned: amavisd-new at compar.com Cc: hackers@freebsd.org Subject: Re: File trees: the deeper, the weirder X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Oct 2006 16:31:59 -0000 [ Restoring some OP context.] > On Sun, Oct 29, 2006 at 05:07:16PM +0300, Yar Tikhiy wrote: > > > As for the said program, it keeps its 1 Hz pace, mostly waiting on > > "vlruwk". It's killable, after a delay. The system doesn't show ... > > > > Weird, eh? Any ideas what's going on? > > I would guess that you need a new vnode to create the new file, but no > vnodes are obvious candidates for freeing because they all have a child > directory in use. Is there some sort of vnode clearing that goes on every > second if we are short of vnodes? See sys/vfs_subr.c, subroutine getnewvnode(). We call msleep() if we're waiting on vnodes to be created (or recycled). And just look at the 'hz' parameter passed to msleep()! The calling process's mkdir() will end up waiting in getnewvnode() (in "vlruwk" state) while the vnlru kernel thread does it's thing (which is to recycle vnodes.) Either the vnlru kernel thread has to work faster, or the caller has to sleep less, in order to avoid this lock-step behaviour. Regards, -- Matt Emmerton