From owner-freebsd-current@FreeBSD.ORG Wed Nov 24 08:40:54 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 192F516A4CE; Wed, 24 Nov 2004 08:40:54 +0000 (GMT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6122943D2F; Wed, 24 Nov 2004 08:40:53 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.13.1/8.13.1) with ESMTP id iAO8enU5061436; Wed, 24 Nov 2004 09:40:51 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: Peter Jeremy From: "Poul-Henning Kamp" In-Reply-To: Your message of "Mon, 22 Nov 2004 18:31:32 +1100." <20041122073132.GW79646@cirb503493.alcatel.com.au> Date: Wed, 24 Nov 2004 09:40:49 +0100 Message-ID: <61435.1101285649@critter.freebsd.dk> Sender: phk@critter.freebsd.dk cc: arch@freebsd.org cc: current@freebsd.org Subject: Re: [REVIEW/TEST] nanodelay() vs DELAY() 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: Wed, 24 Nov 2004 08:40:54 -0000 In message <20041122073132.GW79646@cirb503493.alcatel.com.au>, Peter Jeremy wri tes: >The fact that this doesn't show up in the graph suggests that you're >not using tc_nanodelay() at all within the 0..8usec range. Right, but I can't trust that to be the case as CPUs get faster. Originally I considered having MD routines registered also, stuff like doing an "inb()" on i386 etc. As it transpired the exponential nature of the nanodelay_loopcall2() function makes this unnecessary. >Your graph suggests that it's fairly good above about 200nsec even on >equipment that is not blazingly fast. Don't let the log-log scale deceive you. being 50% wrong doesn't look like much. >Have you looked at the granularity of tc_nanodelay() (and the likely >granularity required by callers)? Is 8nsec reasonable given the >inner loop of of tc_nanodelay()? I'm actually considering making it 32nsec based on a 33MHz PCI speed. >Do you have any idea where the transition points between the various >delay functions are? If you boot -v it will tell you. >>The array takes up 9000 bytes on 32 bit and 17000 on 64 bit. > >AFAIK, all the FreeBSD architectures have 32-bit ints, so that should >be 13,000 bytes for 64bit architectures. Still, that's an awful lot for an old ass'y programmer like me :-) -- 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.