From owner-freebsd-hackers Sun Dec 15 12:26:55 2002 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 CCD0837B401 for ; Sun, 15 Dec 2002 12:26:53 -0800 (PST) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id CA43243EC5 for ; Sun, 15 Dec 2002 12:26:52 -0800 (PST) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.6/8.12.6) with ESMTP id gBFKQlJe071696; Sun, 15 Dec 2002 21:26:47 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: Nate Lawson Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: setattr() syscall as proposed by phk From: phk@FreeBSD.ORG In-Reply-To: Your message of "Sun, 15 Dec 2002 12:21:16 PST." Date: Sun, 15 Dec 2002 21:26:47 +0100 Message-ID: <71695.1039984007@critter.freebsd.dk> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message , Nate Lawson wri tes: >> Because 1 syscall and 2 namei calls are faster than 4 syscalls and >> four namei calls. > >Which leaves us back at my previous point which is that something is wrong >with caching if 4 namei calls (for the SAME name) are so much slower. A >great task would be to examine/test namei(), identify why it's not cached >correctly, and fix the underlying problem. The syscall boundary crossing >is NOT significant here. When you restore a N files, it makes a difference if you need to do 4N syscalls and 4N namei's or just 1N syscalls and 2N nameis. Caching makes the difference smaller, but the fact remains that there is a difference. In particular as N climbs into the range of millions. Don't forget that restore uses (and has to!) paths relative to its root directory, each of the nameis can trivially contain a handful of component names. -- 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-hackers" in the body of the message