From: "Venkatesh Pallipadi" <venkatesh.pallipadi@intel.com>
To: "Ingo Molnar" <mingo@elte.hu>, "H. Peter Anvin" <hpa@zytor.com>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Len Brown" <lenb@kernel.org>,
"Mark Hounschell" <markh@compro.net>
Cc: linux-kernel@vger.kernel.org, "Rafael J. Wysocki" <rjw@sisk.pl>,
"Alain Knaff" <alain@knaff.lu>,
"Linus Torvalds" <torvalds@linux-foundation.org>,
"Li, Shaohua" <shaohua.li@intel.com>
Subject: [patch 4/4] x86: Adjust HPET MSI timer rating to work with tick_check_fallback_timer
Date: Thu, 14 Jan 2010 17:40:01 -0800 [thread overview]
Message-ID: <20100115014210.299455000@intel.com> (raw)
In-Reply-To: 20100115013957.027452000@intel.com
[-- Attachment #1: 0005-x86-Adjust-HPET-MSI-timer-rating-to-work-with-tick_.patch --]
[-- Type: text/plain, Size: 1791 bytes --]
Before this change we had
Normal lapic_clockevent rating 100
hpet MSI (percpu) clockevent rating 110
Always Running lapic_clockevent rating 150
As a result, on systems that support HPET MSI, percpu clockevents got
priority over LAPIC timer. That was ok when systems supported deep
C-state. But, that was sub-optimal on systems that did not support deep
C-states as HPETs are slower than LAPIC.
There was also a functional issue with usage of HPET MSI on some
platforms, which do not support deep C-state as reported here.
http://lkml.indiana.edu/hypermail/linux/kernel/0912.2/01118.html
After the change,
hpet MSI (percpu) clockevent rating 95
Normal lapic_clockevent rating 100
Always Running lapic_clockevent rating 150
And we reduce the rating of non-Always_Running LAPIC timer (to 90),
when we see that deep C-states are supported and switch to hpet MSI.
This change makes the timer usage optimal in terms of performance and
also eliminates the functionality issue mentioned above.
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
---
arch/x86/kernel/hpet.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c
index dd9370b..ccb3752 100644
--- a/arch/x86/kernel/hpet.c
+++ b/arch/x86/kernel/hpet.c
@@ -555,7 +555,11 @@ static void init_one_hpet_msi_clockevent(struct hpet_dev *hdev, int cpu)
hpet_setup_irq(hdev);
evt->irq = hdev->irq;
- evt->rating = 110;
+ /*
+ * Rating should be within 10 less than lapic timer for
+ * timer switch to happen when deep C-states are supported.
+ */
+ evt->rating = 95;
evt->features = CLOCK_EVT_FEAT_ONESHOT | CLOCK_EVT_FEAT_NO_BROADCAST;
if (hdev->flags & HPET_DEV_PERI_CAP)
evt->features |= CLOCK_EVT_FEAT_PERIODIC;
--
1.6.0.6
--
next prev parent reply other threads:[~2010-01-15 1:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-15 1:39 [patch 0/4] Only use HPET MSI timers on systems with deep C-state support Venkatesh Pallipadi
2010-01-15 1:39 ` [patch 1/4] acpi: acpi_cpu_soft_notify() not getting called on resume Venkatesh Pallipadi
2010-01-15 1:39 ` [patch 2/4] x86: Do not use hpet MSI as clockevent broadcast device Venkatesh Pallipadi
2010-01-15 2:00 ` H. Peter Anvin
2010-01-15 2:07 ` Pallipadi, Venkatesh
2010-01-15 1:40 ` [patch 3/4] clockevent: Add tick_check_fallback_timer to look for fallback timer Venkatesh Pallipadi
2010-01-15 1:40 ` Venkatesh Pallipadi [this message]
2010-01-15 21:53 ` [patch 0/4] Only use HPET MSI timers on systems with deep C-state support Mark Hounschell
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=20100115014210.299455000@intel.com \
--to=venkatesh.pallipadi@intel.com \
--cc=alain@knaff.lu \
--cc=hpa@zytor.com \
--cc=lenb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=markh@compro.net \
--cc=mingo@elte.hu \
--cc=rjw@sisk.pl \
--cc=shaohua.li@intel.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.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