Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1442479

Re: [PATCH v3 1/3] arch, x86, tsc deadline clockevent dev: reduce frequency roundoff error

From Paolo Bonzini <pbonzini@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH v3 1/3] arch, x86, tsc deadline clockevent dev: reduce frequency roundoff error
Date 2016-07-13 16:00 +0200
Message-ID <rUsRH-3OH-21@gated-at.bofh.it> (permalink)
References <rUs5k-3uO-3@gated-at.bofh.it> <rUs5k-3uO-1@gated-at.bofh.it> <rUsRH-3OH-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3 1/3] arch, x86, tsc deadline clockevent dev: reduce frequency roundoff error Nicolai Stange <nicstange@gmail.com> - 2016-07-13 15:10 +0200
  Re: [PATCH v3 1/3] arch, x86, tsc deadline clockevent dev: reduce  frequency roundoff error Peter Zijlstra <peterz@infradead.org> - 2016-07-13 16:00 +0200
    Re: [PATCH v3 1/3] arch, x86, tsc deadline clockevent dev: reduce  frequency roundoff error Paolo Bonzini <pbonzini@redhat.com> - 2016-07-13 16:00 +0200
      Re: [PATCH v3 1/3] arch, x86, tsc deadline clockevent dev: reduce frequency roundoff error Nicolai Stange <nicstange@gmail.com> - 2016-07-13 16:40 +0200

csiph-web