Re: do_div64 generic

Andrew Morton
2003-07-15T21:59:10Z

george anzinger <george@mvista.com> wrote:
>
> > George, do you agree? May I go on and post a patch killing
> > div_long_long_rem() everywhere?
>
> The issue is that div is a very long instruction and the do_div()
> thing uses 2 or three of them, while the div_long_long_rem() is just
> 1. Also, a lot of archs already have the required div by a different
> name. It all boils down to a performance thing.

It is only used in nanosleep(), and then only in the case where the sleep
terminated early.

If someone is calling nanosleep() so frequently for this to matter, the
time spent in divide is the least of their problems. Unless you have some
real-worldish benchmarks to demonstrate otherwise?

You know what they say about premtur optmstns, and having to propagate
funky new divide primitives across N architectures is indeed evil.

Bernardo, can you do the patch please?