public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] raise tsc clocksource rating
@ 2007-10-29 23:10 Glauber de Oliveira Costa
       [not found] ` <11936994092607-git-send-email-gcosta-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 29+ messages in thread
From: Glauber de Oliveira Costa @ 2007-10-29 23:10 UTC (permalink / raw)
  To: linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: jeremy-TSDbQ3PG+2Y, avi-i/T1Zxg06OZWk0Htik3J/w,
	kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	Glauber de Oliveira Costa, Glauber de Oliveira Costa,
	--cc-H+wXaHxf7aLQT0dZR+AlfA

From: Glauber de Oliveira Costa <glauber-aMxvdZfKFXomYvmMESoHnA@public.gmane.org>

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-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 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


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/

^ permalink raw reply related	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2007-10-30 17:58 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-29 23:10 [PATCH] raise tsc clocksource rating Glauber de Oliveira Costa
     [not found] ` <11936994092607-git-send-email-gcosta-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2007-10-29 22:17   ` Thomas Gleixner
2007-10-29 22:36     ` Ingo Molnar
2007-10-30  1:26     ` john stultz
     [not found]     ` <alpine.LFD.0.9999.0710292315280.3186-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2007-10-30  2:39       ` Rusty Russell
     [not found]         ` <200710301339.23628.rusty-8n+1lVoiYb80n/F98K4Iww@public.gmane.org>
2007-10-30  7:37           ` Ingo Molnar
     [not found]             ` <20071030073736.GA21843-X9Un+BFzKDI@public.gmane.org>
2007-10-30 10:52               ` Rusty Russell
2007-10-30 12:13               ` Glauber de Oliveira Costa
2007-10-29 22:42   ` Zachary Amsden
     [not found]     ` <1193697734.9793.86.camel-cxY/u30q8FloTgUnLF1by8fTvwmfpRNyZeezCHUQhQ4@public.gmane.org>
2007-10-29 22:45       ` Jeremy Fitzhardinge
2007-10-29 22:48     ` Ingo Molnar
     [not found]       ` <20071029224852.GA27547-X9Un+BFzKDI@public.gmane.org>
2007-10-29 22:52         ` Jeremy Fitzhardinge
2007-10-29 22:55           ` Ingo Molnar
     [not found]             ` <20071029225528.GA31293-X9Un+BFzKDI@public.gmane.org>
2007-10-29 23:17               ` Jeremy Fitzhardinge
     [not found]                 ` <47266A00.4040408-TSDbQ3PG+2Y@public.gmane.org>
2007-10-29 23:21                   ` Ingo Molnar
     [not found]                     ` <20071029232140.GA10518-X9Un+BFzKDI@public.gmane.org>
2007-10-29 23:33                       ` Jeremy Fitzhardinge
2007-10-30  0:45                     ` Ian Pratt
     [not found]                       ` <8A87A9A84C201449A0C56B728ACF491E34C5F5-sZfJFUT1i4lUWNNKjvdVWtlxNDNUtst69dF7HbQ/qKg@public.gmane.org>
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
     [not found]               ` <1193699638.9793.97.camel-cxY/u30q8FloTgUnLF1by8fTvwmfpRNyZeezCHUQhQ4@public.gmane.org>
2007-10-29 23:17                 ` Ingo Molnar
2007-10-30 12:02                 ` Glauber de Oliveira Costa
     [not found]                   ` <47271D4A.8030707-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2007-10-30 17:58                     ` Zachary Amsden
     [not found]             ` <20071029230213.GA1982-X9Un+BFzKDI@public.gmane.org>
2007-10-29 23:24               ` Dan Hecht
     [not found]                 ` <47266B90.8000008-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org>
2007-10-30  4:24                   ` Avi Kivity
2007-10-30  7:14                   ` Ingo Molnar
     [not found]           ` <1193698505.9793.90.camel-cxY/u30q8FloTgUnLF1by8fTvwmfpRNyZeezCHUQhQ4@public.gmane.org>
2007-10-30 11:59             ` Glauber de Oliveira Costa
2007-10-30  0:17   ` H. Peter Anvin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox