Re: 64 bit divide/mod in 2.4.0-test5

Steve Lord (lord@sgi.com)
Mon, 07 Aug 2000 12:30:48 -0500


Linus Torvalds wrote:
>
> On Sun, 6 Aug 2000, Jamie Lokier wrote:
> >
> > I've never tried that algorithm but I would guess it's faster than long
> > division.
>
> Quite possible. I would not be adverse to doing this: the do_div() thing
> is there mainly because it was much easier to move the existing code-base
> over, and the original vsprintf used division.
>
> If somebody wants to write the code...
>
> Linus
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.rutgers.edu
> Please read the FAQ at http://www.tux.org/lkml/

Please do not remove do_div though, I just went through XFS and made all
the
implicit 64 bit divides into explicit ones using do_div. Yes we really
do
have these in the code, fortunately not that many, and they are not just
things
which can be replaced by shifts, but they do all have the 64-by-32
property.

Steve

------------------------------------------------------------------------------
Steve Lord voice: +1-651-683-5291
Silicon Graphics Inc
655F Lone Oak Drive email: lord@sgi.com
Eagan, MN, 55121, USA
------------------------------------------------------------------------------

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