mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ben Woodard <woodard@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>,
	"Behlendorf, Brian D." <behlendorf1@llnl.gov>,
	Jeremy Fitzhardinge <jeremy@goop.org>,
	Mark Grondona <mgrondona@llnl.gov>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] trivial, document that div64_u64() is not precise on 32bit platforms
Date: Tue, 03 Aug 2010 19:12:41 -0500	[thread overview]
Message-ID: <1280880761.10330.5.camel@snog.zork.net> (raw)
In-Reply-To: <20100803152812.210439dc.akpm@linux-foundation.org>

Andrew,

On Tue, 2010-08-03 at 15:28 -0700, Andrew Morton wrote:
> Well that was a bit lazy of us - I wonder how hard it is to fix.
> 
> At present people will test their code on 64-bit only to find out
> later
> that it doesn't work correctly on 32-bit.  Bad.  Perhaps we should
> similarly break the 64-bit version :)

I just talked to Brian. He's got an implementation that does the
division correctly. He's going to clean it up and send you a patch so
that it will work without losing precision on both 32b and 64b. It is
based upon public domain code from  http://www.hackersdelight.org and
has been proven to be correct in all cases.

-ben



  reply	other threads:[~2010-08-04  0:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-02 16:09 Oleg Nesterov
2010-08-03 22:28 ` Andrew Morton
2010-08-04  0:12   ` Ben Woodard [this message]
2010-08-09 16:30   ` [PATCH] Make div64_u64() " Brian Behlendorf
2010-09-17  0:00     ` Oleg Nesterov

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=1280880761.10330.5.camel@snog.zork.net \
    --to=woodard@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=behlendorf1@llnl.gov \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgrondona@llnl.gov \
    --cc=oleg@redhat.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®