[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



>>> On 29.03.18 at 10:17, <olaf@xxxxxxxxx> wrote:
> On Thu, Mar 29, Jan Beulich wrote:
> 
>> >>> On 27.03.18 at 11:26, <olaf@xxxxxxxxx> wrote:
>> > +            khz_diff = cpu_khz > gtsc_khz ?
>> > +                       cpu_khz - gtsc_khz : gtsc_khz - cpu_khz;
>> abs() (or some variant of it, like __builtin_absl(), seeing that we
>> don't appear to have any abstraction right now)?
> 
> I see no other usage of *abs*. Really optimize that one-shot function?

When you use abs() or alike in places like this, it is more immediately
obvious to the reader what you're doing.

>> d%d
> 
> A for an unsigned type? But I see it is done elsewhere, so it must be
> correct.

The type seen by printk() is "int" (i.e. signed) due to the way C's
integral type promotions work.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.