lkml.org 
[lkml]   [2003]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: do_div64 generic
Andrew Morton wrote:
> 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?

It is also used in the jiffies to timespec and jiffies to timeval code
in timer.h, if memory serves.
>
> You know what they say about premtur optmstns, and having to propagate
> funky new divide primitives across N architectures is indeed evil.

Hm. I only want the simple div. 64-bit/32-bit in two 32-bit results.
Is this funky? And the "evil" #ifdef allows archs to not do it.
>
> Bernardo, can you do the patch please?
>
>

--
George Anzinger george@mvista.com
High-res-timers: http://sourceforge.net/projects/high-res-timers/
Preemption patch: http://www.kernel.org/pub/linux/kernel/people/rml

-
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/

\
 
 \ /
  Last update: 2005-03-22 13:46    [W:0.081 / U:0.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site