qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: "Alex Bennée" <alex.bennee@linaro.org>,
	"Emilio G . Cota" <cota@braap.org>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"QEMU Developers" <qemu-devel@nongnu.org>
Subject: Re: [PATCH v4 6/6] qht: Fix threshold rate calculation
Date: Fri, 19 Jun 2020 18:31:03 +0100	[thread overview]
Message-ID: <CAFEAcA9rtVzZ8VQNQdEquZzHPrU-BugZdaEDYAy32sC97RJdGA@mail.gmail.com> (raw)
In-Reply-To: <c5a6e38c-0365-a695-8bbb-c61b381c668e@linaro.org>

On Wed, 17 Jun 2020 at 21:59, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> On 6/17/20 1:13 PM, Richard Henderson wrote:
> > -        *threshold = rate * UINT64_MAX;
> > +        *threshold = (rate * 0xffff000000000000ull)
> > +                   + (rate * 0x0000ffffffffffffull);
>
> Well, while this does silence the warning, it produces the exact same results
> as before, since the intermediate double result still only has 53 bits of
> precision.
>
> We're probably be better off with the nextafter(0x1p64, 0.0) form that we've
> used elsewhere.

Yeah, the code does look a bit odd. I'm going to apply this one to master
as well just to suppress all the patchew nagmails, but we should
figure out the correct thing to do here.

thanks
-- PMM


  reply	other threads:[~2020-06-19 17:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-17 20:13 [PATCH v4 0/6] Vs clang-10 and gcc-9 warnings Richard Henderson
2020-06-17 20:13 ` [PATCH v4 1/6] fpu/softfloat: Silence 'bitwise negation of boolean expression' warning Richard Henderson
2020-06-17 20:13 ` [PATCH v4 2/6] migration: fix xbzrle encoding rate calculation Richard Henderson
2020-06-17 20:13 ` [PATCH v4 3/6] configure: Clean up warning flag lists Richard Henderson
2020-06-17 20:13 ` [PATCH v4 4/6] configure: Disable -Wtautological-type-limit-compare Richard Henderson
2020-06-17 20:13 ` [PATCH v4 5/6] configure: Add -Wno-psabi Richard Henderson
2020-06-17 20:13 ` [PATCH v4 6/6] qht: Fix threshold rate calculation Richard Henderson
2020-06-17 20:58   ` Richard Henderson
2020-06-19 17:31     ` Peter Maydell [this message]
2020-06-18 10:22 ` [PATCH v4 0/6] Vs clang-10 and gcc-9 warnings Peter Maydell

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=CAFEAcA9rtVzZ8VQNQdEquZzHPrU-BugZdaEDYAy32sC97RJdGA@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=cota@braap.org \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /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;
as well as URLs for NNTP newsgroup(s).