[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <8737ndtxrc.fsf@gmail.com>
Date: Wed, 13 Jul 2016 16:31:51 +0200
From: Nicolai Stange <nicstange@...il.com>
To: Paolo Bonzini <pbonzini@...hat.com>
Cc: Peter Zijlstra <peterz@...radead.org>,
Nicolai Stange <nicstange@...il.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
Borislav Petkov <bp@...e.de>,
Viresh Kumar <viresh.kumar@...aro.org>,
Hidehiro Kawai <hidehiro.kawai.ez@...achi.com>,
Len Brown <len.brown@...el.com>,
"Christopher S. Hall" <christopher.s.hall@...el.com>,
Adrian Hunter <adrian.hunter@...el.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 1/3] arch, x86, tsc deadline clockevent dev: reduce frequency roundoff error
Paolo Bonzini <pbonzini@...hat.com> writes:
> 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.
Oh great, I didn't see this. Will resend.
Thanks,
Nicolai
Powered by blists - more mailing lists