LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Stephen Hemminger <shemminger@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] udivdi3: 64 bit divide
Date: Tue, 27 Feb 2007 13:36:56 -0800 [thread overview]
Message-ID: <20070227133656.c452fbb4.akpm@linux-foundation.org> (raw)
In-Reply-To: <20070227131840.672d6932@localhost>
> On Tue, 27 Feb 2007 13:18:40 -0800 Stephen Hemminger <shemminger@linux-foundation.org> wrote:
> On Tue, 27 Feb 2007 12:24:37 -0800
> Andrew Morton <akpm@linux-foundation.org> wrote:
>
> > > On Mon, 26 Feb 2007 17:35:17 -0800 Stephen Hemminger <shemminger@linux-foundation.org> wrote:
> > > The kernel already has several implmentations and usages of 64 by 64
> > > bit divide.
> > >
> > > Although it is significantly slower, there are places that need it so
> > > provide one generic version using scaling, and allow existing platform
> > > versions to continue.
> >
> > The reason we implement 64/32 via do_div() is, for better or for worse, to
> > make people think before they use it. And to make it stand out, and so
> > that we discover places that are using it by accident, where they could use
> > something cheaper.
> >
> > However your implementation of the presumably even more expensive 64/64
> > allows us to do 64/64 with a plain old "/" operator.
> >
> > If the do_div() philosophy is any good then we should surely repeat it for
> > 64/64, no?
> >
>
> Then we should pull the existing udivdi3 implementations?
Not much point really. Some architectures have gone and done that, but x86
has not. x86 has enough coverage for us to pick up most problems, and any
remaining problems are obviously in scruffy architectures which don't care
about performance ;)
next prev parent reply other threads:[~2007-02-27 21:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-27 1:35 Stephen Hemminger
2007-02-27 20:24 ` Andrew Morton
2007-02-27 21:18 ` Stephen Hemminger
2007-02-27 21:36 ` Andrew Morton [this message]
2007-02-27 22:24 ` Russell King
2007-02-27 22:39 ` Ian Molton
2007-02-28 22:30 ` Jan Engelhardt
2007-03-01 17:02 ` Ian Molton
2007-03-01 1:29 ` Tim Schmielau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070227133656.c452fbb4.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=shemminger@linux-foundation.org \
--subject='Re: [PATCH] udivdi3: 64 bit divide' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).