Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1440097
| From | Nicolai Stange <nicstange@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 2/4] arch, x86, tsc deadline clockevent dev: reduce TSC_DIVISOR to 2 |
| Date | 2016-07-10 14:30 +0200 |
| Message-ID | <rTm1X-AD-17@gated-at.bofh.it> (permalink) |
| References | <rTm1X-AD-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
In order to avoid overflowing an u32, the TSC deadline clockevent device's frequency is divided by TSC_DIVISOR at registration. The TSC_DIVISOR is currently defined as equaling 32 which allows for a TSC frequency as high as 2^32 / 10^9ns * 32 = 137 GHz. OTOH, larger values of TSC_DIVISOR introduce bigger roundoff errors into the device's frequency. A value of 2 for TSC_DIVISOR allows for a TSC frequency of 2^32 / 10^9ns * 2 = 8.5 GHz which is still way larger than anything to expect in the next years. Reduce the TSC deadline clockevent device's TSC_DIVISOR from 32 down to 2. Signed-off-by: Nicolai Stange <nicstange@gmail.com> --- arch/x86/kernel/apic/apic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c index dce654c..1d22c72 100644 --- a/arch/x86/kernel/apic/apic.c +++ b/arch/x86/kernel/apic/apic.c @@ -311,7 +311,7 @@ int lapic_get_maxlvt(void) /* Clock divisor */ #define APIC_DIVISOR 16 -#define TSC_DIVISOR 32 +#define TSC_DIVISOR 2 /* * This function sets up the local APIC timer, with a timeout of -- 2.9.0
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/4] avoid double timer interrupt with nohz and Intel TSC Nicolai Stange <nicstange@gmail.com> - 2016-07-10 14:30 +0200
[PATCH 4/4] kernel/time/clockevents: compensate for monotonic clock's dynamic frequency Nicolai Stange <nicstange@gmail.com> - 2016-07-10 14:30 +0200
Re: [PATCH 4/4] kernel/time/clockevents: compensate for monotonic clock's dynamic frequency kbuild test robot <lkp@intel.com> - 2016-07-10 15:30 +0200
Re: [PATCH 4/4] kernel/time/clockevents: compensate for monotonic clock's dynamic frequency kbuild test robot <lkp@intel.com> - 2016-07-10 16:00 +0200
Re: [PATCH 4/4] kernel/time/clockevents: compensate for monotonic clock's dynamic frequency kbuild test robot <lkp@intel.com> - 2016-07-10 16:20 +0200
[PATCH 3/4] arch, x86, tsc: inform TSC deadline clockevent device about recalibration Nicolai Stange <nicstange@gmail.com> - 2016-07-10 14:30 +0200
Re: [PATCH 3/4] arch, x86, tsc: inform TSC deadline clockevent device about recalibration kbuild test robot <lkp@intel.com> - 2016-07-10 14:50 +0200
[PATCH 2/4] arch, x86, tsc deadline clockevent dev: reduce TSC_DIVISOR to 2 Nicolai Stange <nicstange@gmail.com> - 2016-07-10 14:30 +0200
Re: [PATCH 0/4] avoid double timer interrupt with nohz and Intel TSC Nicolai Stange <nicstange@gmail.com> - 2016-07-10 21:40 +0200
csiph-web