Re: [REVIEW/TEST] nanodelay() vs DELAY()

From: Poul-Henning Kamp <phk_at_phk.freebsd.dk>
Date: Wed, 24 Nov 2004 09:40:49 +0100
In message <20041122073132.GW79646_at_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_at_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.
Received on Wed Nov 24 2004 - 07:40:54 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:23 UTC