From owner-freebsd-current@FreeBSD.ORG Sat Sep 4 03:32:08 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 8468716A4CE; Sat, 4 Sep 2004 03:32:08 +0000 (GMT) Received: from ganymede.hub.org (blk-222-46-91.eastlink.ca [24.222.46.91]) by mx1.FreeBSD.org (Postfix) with ESMTP id 12D5B43D41; Sat, 4 Sep 2004 03:32:08 +0000 (GMT) (envelope-from scrappy@hub.org) Received: by ganymede.hub.org (Postfix, from userid 1000) id 4B1C13A673; Sat, 4 Sep 2004 00:32:07 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by ganymede.hub.org (Postfix) with ESMTP id 4A2A93A66E; Sat, 4 Sep 2004 00:32:07 -0300 (ADT) Date: Sat, 4 Sep 2004 00:32:07 -0300 (ADT) From: "Marc G. Fournier" To: Don Lewis In-Reply-To: <200409032252.i83MqBJl030297@gw.catspoiler.org> Message-ID: <20040904003116.J812@ganymede.hub.org> References: <200409032252.i83MqBJl030297@gw.catspoiler.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed cc: freebsd-current@freebsd.org cc: keramida@linux.gr Subject: Re: what is fsck's "slowdown"? 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: Sat, 04 Sep 2004 03:32:08 -0000 Long shot here, but is this a change that could be MFC'd to 4.x? Or has fsck changed so much since that it could only be done in 5.x? I just finished another 12hr fsck run *sigh* On Fri, 3 Sep 2004, Don Lewis wrote: > On 4 Sep, Giorgos Keramidas wrote: >> On 2004-09-03 14:58, Don Lewis wrote: > >>> Using two CPUs would give you at best a 2x speedup, and in this case it >>> would be quite a bit less since both CPUs would be trying to access and >>> modify the same data structure. Just using a better data structure is >>> likely to speed things up much more than 2x. Something as simple as >>> building the list in reverse order in pass 1 is likely to make a huge >>> difference. >> >> Holding both a head and tail pointer to the singly-linked list should >> probably make it easier to add nodes at the end of the list instead of >> the head. I haven't read the source of fsck_ffs at all though, so I >> don't know if I can come up with a working patch in a reasonable amount >> of time. > > Yes, if fsck used the macros, this data structure should > probably be a STAILQ. The code if fsck is all hand rolled and it would > be trivially easy to add a tail pointer. The head of the list in > question is > struct zlncnt *zlnhead; > The only modifications needed would be in the initialization code in > main.c, and the code that builds the list in pass1.c. > > > ---- Marc G. Fournier Hub.Org Networking Services (http://www.hub.org) Email: scrappy@hub.org Yahoo!: yscrappy ICQ: 7615664