From: Glauber de Oliveira Costa <gcosta@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: tglx@linutronix.de, rusty@rustcorp.com.au, jeremy@goop.org,
--cc@redhat.com, mingo@elte.hu, avi@quramnet.com,
kvm-devel@lists.sourceforge.net,
Glauber de Oliveira Costa <glauber@t60.localdomain>,
Glauber de Oliveira Costa <gcosta@redhat.com>
Subject: [PATCH] raise tsc clocksource rating
Date: Mon, 29 Oct 2007 20:10:09 -0300 [thread overview]
Message-ID: <11936994092607-git-send-email-gcosta@redhat.com> (raw)
From: Glauber de Oliveira Costa <glauber@t60.localdomain>
tsc is very good time source (when it does not have drifts, does not
change it's frequency, i.e. when it works), so it should have its rating
raised to a value greater than, or equal 400.
Since it's being a tendency among paravirt clocksources to use values
around 400, we should declare tsc as even better: So we use 500.
This patch also touches the comments on clocksource.h, which suggests
that 499 would be a limit on the rating values.
Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com>
---
arch/x86/kernel/tsc_32.c | 2 +-
arch/x86/kernel/tsc_64.c | 2 +-
include/linux/clocksource.h | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/x86/kernel/tsc_32.c b/arch/x86/kernel/tsc_32.c
index 9ebc0da..4d91e59 100644
--- a/arch/x86/kernel/tsc_32.c
+++ b/arch/x86/kernel/tsc_32.c
@@ -280,7 +280,7 @@ static cycle_t read_tsc(void)
static struct clocksource clocksource_tsc = {
.name = "tsc",
- .rating = 300,
+ .rating = 500,
.read = read_tsc,
.mask = CLOCKSOURCE_MASK(64),
.mult = 0, /* to be set */
diff --git a/arch/x86/kernel/tsc_64.c b/arch/x86/kernel/tsc_64.c
index 9c70af4..4fd5b1b 100644
--- a/arch/x86/kernel/tsc_64.c
+++ b/arch/x86/kernel/tsc_64.c
@@ -262,7 +262,7 @@ static cycle_t __vsyscall_fn vread_tsc(void)
static struct clocksource clocksource_tsc = {
.name = "tsc",
- .rating = 300,
+ .rating = 500,
.read = read_tsc,
.mask = CLOCKSOURCE_MASK(64),
.shift = 22,
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h
index 107787a..5b0aadd 100644
--- a/include/linux/clocksource.h
+++ b/include/linux/clocksource.h
@@ -39,7 +39,7 @@ struct clocksource;
* A correct and usable clocksource.
* 300-399: Desired.
* A reasonably fast and accurate clocksource.
- * 400-499: Perfect
+ * >= 400 : Perfect
* The ideal clocksource. A must-use where
* available.
* @read: returns a cycle value
--
1.5.0.6
next reply other threads:[~2007-10-29 22:10 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-29 23:10 Glauber de Oliveira Costa [this message]
2007-10-29 22:17 ` [PATCH] raise tsc clocksource rating Thomas Gleixner
2007-10-29 22:36 ` Ingo Molnar
2007-10-30 1:26 ` john stultz
2007-10-30 2:39 ` Rusty Russell
2007-10-30 7:37 ` Ingo Molnar
2007-10-30 10:52 ` Rusty Russell
2007-10-30 12:13 ` Glauber de Oliveira Costa
2007-10-29 22:42 ` Zachary Amsden
2007-10-29 22:45 ` Jeremy Fitzhardinge
2007-10-29 22:48 ` Ingo Molnar
2007-10-29 22:52 ` Jeremy Fitzhardinge
2007-10-29 22:55 ` Ingo Molnar
2007-10-29 23:17 ` Jeremy Fitzhardinge
2007-10-29 23:21 ` Ingo Molnar
2007-10-29 23:33 ` Jeremy Fitzhardinge
2007-10-30 0:45 ` Ian Pratt
2007-10-30 7:19 ` Ingo Molnar
2007-10-29 22:55 ` Zachary Amsden
2007-10-29 23:02 ` Ingo Molnar
2007-10-29 23:13 ` Zachary Amsden
2007-10-29 23:17 ` Ingo Molnar
2007-10-30 12:02 ` Glauber de Oliveira Costa
2007-10-30 17:58 ` Zachary Amsden
2007-10-29 23:24 ` Dan Hecht
2007-10-30 4:24 ` [kvm-devel] " Avi Kivity
2007-10-30 7:14 ` Ingo Molnar
2007-10-30 11:59 ` Glauber de Oliveira Costa
2007-10-30 0:17 ` H. Peter Anvin
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=11936994092607-git-send-email-gcosta@redhat.com \
--to=gcosta@redhat.com \
--cc=--cc@redhat.com \
--cc=avi@quramnet.com \
--cc=glauber@t60.localdomain \
--cc=jeremy@goop.org \
--cc=kvm-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rusty@rustcorp.com.au \
--cc=tglx@linutronix.de \
/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