From: Nicolai Stange <nicstange@gmail.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
x86@kernel.org, Borislav Petkov <bp@suse.de>,
Paolo Bonzini <pbonzini@redhat.com>,
Viresh Kumar <viresh.kumar@linaro.org>,
Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>,
"Peter Zijlstra (Intel)" <peterz@infradead.org>,
"Christopher S. Hall" <christopher.s.hall@intel.com>,
Adrian Hunter <adrian.hunter@intel.com>,
linux-kernel@vger.kernel.org,
Nicolai Stange <nicstange@gmail.com>
Subject: [PATCH v4 0/2] reduce TSC deadline frequency errors
Date: Thu, 14 Jul 2016 17:22:53 +0200 [thread overview]
Message-ID: <20160714152255.18295-1-nicstange@gmail.com> (raw)
The v3 series can be found at
http://lkml.kernel.org/g/20160713130344.8319-1-nicstange@gmail.com
Applicable to linux-next-20160708 (in case you wonder why I turned back
from the 20160712 given in v3 to 20160708 again: mysteriously, 20160712
doesn't boot neither w/ nor w/o this series anymore).
The individual patches don't depend on each other.
Changes to v3:
As Paolo Bonzini pointed out in reply to v3, for the values of 2, 4 and
8 of TSC_DIVISOR, the 64 bit division
(u32)(((u64)tsc_khz * 1000) / TSC_DIVISOR)
can be safely turned into a 32 bit division by changing associativity:
tsc_khz * (1000 / TSC_DIVISOR)
In doing so, it suggests itself to squash former [1/3] ("arch, x86, tsc
deadline clockevent dev: reduce frequency roundoff error") and
[2/3] ("arch, x86, tsc deadline clockevent dev: reduce TSC_DIVISOR to 2")
into a single patch. Furthermore, reducing TSC_DIVISOR down to 2 becomes
unnessecary -- setting it to 8 suffices already.
Thus,
- [1/2] ("arch, x86, tsc deadline clockevent dev: eliminate frequency
roundoff error")
Former [1/3] and [2/3] squashed together. Don't reduce TSC_DIVISOR
to 2 but to 8 only. Change associativity in order to get rid of the
64 bit division. Adapt the commit message accordingly.
- [2/2] ("arch, x86, tsc: inform TSC deadline clockevent device about
recalibration")
Former [3/3]. Likewise change associativity in order to get rid of
the 64 bit division here, too.
Changes to v2:
- [3/3] ("arch, x86, tsc: inform TSC deadline clockevent device about
recalibration")
Use clockevents_update_freq() rather than clockevents_config().
- Former [4/4] ("kernel/time/clockevents: compensate for monotonic
clock's dynamic frequency")
Split off, not a member of this series anymore.
Changes to v1:
- [1/3] ("arch, x86, tsc deadline clockevent dev: reduce frequency
roundoff error")
No changes to the patch. Note that the v1 mail could not be delivered
to the author of the TSC_DIVISOR introducing commit 279f1461432c
("x86: apic: Use tsc deadline for oneshot when available"),
Suresh Siddha <suresh.b.siddha@intel.com>, so I had to remove him
from the CC list.
- [2/3] ("arch, x86, tsc deadline clockevent dev: reduce TSC_DIVISOR
to 2")
Likewise.
- [3/3] ("arch, x86, tsc: inform TSC deadline clockevent device about
recalibration")
Silence the kbuild test robot on ARCH=i386 by wrapping the new call
to lapic_update_tsc_freq() from arch/x86/kernel/tsc.c in an
#ifdef CONFIG_X86_LOCAL_APIC.
Nicolai Stange (2):
arch, x86, tsc deadline clockevent dev: eliminate frequency roundoff
error
arch, x86, tsc: inform TSC deadline clockevent device about
recalibration
arch/x86/include/asm/apic.h | 1 +
arch/x86/kernel/apic/apic.c | 28 ++++++++++++++++++++++++++--
arch/x86/kernel/tsc.c | 6 ++++++
3 files changed, 33 insertions(+), 2 deletions(-)
--
2.9.0
next reply other threads:[~2016-07-14 15:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-14 15:22 Nicolai Stange [this message]
2016-07-14 15:22 ` [PATCH v4 1/2] arch, x86, tsc deadline clockevent dev: eliminate frequency roundoff error Nicolai Stange
2016-07-14 15:43 ` Paolo Bonzini
2016-07-16 21:08 ` Nicolai Stange
2016-08-10 17:55 ` [tip:timers/urgent] x86/timers/apic: Fix imprecise timer interrupts by eliminating TSC clockevents " tip-bot for Nicolai Stange
2016-07-14 15:22 ` [PATCH v4 2/2] arch, x86, tsc: inform TSC deadline clockevent device about recalibration Nicolai Stange
2016-08-10 17:55 ` [tip:timers/urgent] x86/timers/apic: Inform " tip-bot for Nicolai Stange
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160714152255.18295-1-nicstange@gmail.com \
--to=nicstange@gmail.com \
--cc=adrian.hunter@intel.com \
--cc=bp@suse.de \
--cc=christopher.s.hall@intel.com \
--cc=hidehiro.kawai.ez@hitachi.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=viresh.kumar@linaro.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).