Re: [PATCH] PATCH: add framework for ndelay (nanoseconds)

From: Alan Cox (alan@lxorguk.ukuu.org.uk)
Date: Thu Feb 06 2003 - 10:53:05 EST


On Thu, 2003-02-06 at 14:49, Ivan Kokshaysky wrote:
> > Wouldn't it make more sense to call the parameter `nsecs' (or `ns')?
>
> There are more serious problems with this implementation:
> 1) It's *very* imprecise. Even on an 1 GHz CPU and with HZ = 100 precision
> is ~86 nsec. With HZ = 1000 it's almost unusable on *any* CPU.

HZ = 1000 isn't a 2.4 thing.

> As of current 2.4, there is the only user of ndelay() - ide_execute_command()
> that calls ndelay(400). Why udelay(1) cannot be used instead?

Why waste 500nS every IDE command as opposed to doing the job right ? The initial
ndelay() is a quick implementation. If you don't like it implement a better one,
if your box isnt fast implement it as udelay.

In the 2.5 tree I also hope we can avoid the ndelay in some cases

Alan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Feb 07 2003 - 22:00:20 EST