[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCH v5] new config option vtsc_tolerance_khz to avoid TSC emulation
- To: "Olaf Hering" <olaf@xxxxxxxxx>
- From: "Jan Beulich" <JBeulich@xxxxxxxx>
- Date: Thu, 29 Mar 2018 04:36:29 -0600
- Cc: Tim Deegan <tim@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wei.liu2@xxxxxxxxxx>, George Dunlap <George.Dunlap@xxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Ian Jackson <ian.jackson@xxxxxxxxxxxxx>, Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxx, Julien Grall <julien.grall@xxxxxxx>
- Delivery-date: Thu, 29 Mar 2018 10:36:37 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
>>> On 29.03.18 at 12:05, <olaf@xxxxxxxxx> wrote:
> On Thu, Mar 29, Jan Beulich wrote:
>
>> Actually I was wrong - we have an abstraction already, just that
>> it's upper case: ABS(). But it requires its input to have signed type.
>
> Would this be acceptable?
> khz_diff = ABS((long)cpu_khz - (long)gtsc_khz);
In the worst case, yes. I'd prefer if you got away with just a single
cast though.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|