From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Tu Dinh <ngoc-tu.dinh@vates.tech>
Cc: xen-devel@lists.xenproject.org,
Stefano Stabellini <sstabellini@kernel.org>,
Julien Grall <julien@xen.org>,
Bertrand Marquis <bertrand.marquis@arm.com>,
Michal Orzel <michal.orzel@amd.com>,
Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>,
Alistair Francis <alistair.francis@wdc.com>,
Connor Davis <connojdavis@gmail.com>,
Oleksii Kurochko <oleksii.kurochko@gmail.com>,
Jan Beulich <jbeulich@suse.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Teddy Astie <teddy.astie@vates.tech>
Subject: Re: [PATCH 2/2] xen/cpu: round up cpu_khz calculations
Date: Tue, 14 Apr 2026 13:56:02 +0200 [thread overview]
Message-ID: <ad4rUspwCosSxfs4@macbook.local> (raw)
In-Reply-To: <d647f18c-c91b-4507-ac1a-149e50d14062@vates.tech>
On Tue, Apr 14, 2026 at 11:36:22AM +0000, Tu Dinh wrote:
> On 14/04/2026 12:36, Roger Pau Monne wrote:
> > All arches truncate the cpu_khz without taking into account the less
> > significant digits. Instead use DIV_ROUND_UP() when scaling from Hz to kHz
> > to get as more accurate kHz value.
> >
> > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
>
> Couldn't DIV_ROUND be used here instead for a round-to-closest?
My bad, I got confused with the macro names.
Roger.
next prev parent reply other threads:[~2026-04-14 11:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-14 10:33 [PATCH 0/2] time: fix time accounting for x86 HVM guests Roger Pau Monne
2026-04-14 10:33 ` [PATCH 1/2] x86/time: use native TSC scaling factors when TSC is not scaled Roger Pau Monne
2026-04-16 11:28 ` Jan Beulich
2026-04-16 12:51 ` Roger Pau Monné
2026-04-16 12:57 ` Jan Beulich
2026-04-16 13:13 ` Roger Pau Monné
2026-04-16 13:21 ` Jan Beulich
2026-04-14 10:33 ` [PATCH 2/2] xen/cpu: round up cpu_khz calculations Roger Pau Monne
2026-04-14 11:36 ` Tu Dinh
2026-04-14 11:56 ` Roger Pau Monné [this message]
2026-04-16 7:55 ` Jan Beulich
2026-04-14 20:08 ` [PATCH 0/2] time: fix time accounting for x86 HVM guests Stefano Stabellini
2026-04-15 8:44 ` Marek Marczykowski-Górecki
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=ad4rUspwCosSxfs4@macbook.local \
--to=roger.pau@citrix.com \
--cc=Volodymyr_Babchuk@epam.com \
--cc=alistair.francis@wdc.com \
--cc=andrew.cooper3@citrix.com \
--cc=bertrand.marquis@arm.com \
--cc=connojdavis@gmail.com \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=michal.orzel@amd.com \
--cc=ngoc-tu.dinh@vates.tech \
--cc=oleksii.kurochko@gmail.com \
--cc=sstabellini@kernel.org \
--cc=teddy.astie@vates.tech \
--cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.