lkml.org 
[lkml]   [2016]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 1/3] arch, x86, tsc deadline clockevent dev: reduce frequency roundoff error
From
Date


On 13/07/2016 15:49, Peter Zijlstra wrote:
> On Wed, Jul 13, 2016 at 03:03:42PM +0200, Nicolai Stange wrote:
>
>> clockevents_config_and_register(levt,
>> + (u32)(((u64)tsc_khz * 1000) /
>> + TSC_DIVISOR),
>> 0xF, ~0UL);
>
> div_u64() perhaps ?

Or just squash together the two patches and do

tsc_khz * (1000 / TSC_DIVISOR)

because with TSC_DIVISOR equal to 2/4/8 there is no error from
reassociating the operation.

Paolo

\
 
 \ /
  Last update: 2016-07-13 16:21    [W:0.757 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site