x86/UV: Lower UV rtc clocksource rating

Lower the rating of the UV rtc clocksource to just below that of
the tsc, to improve performance.

Reading the tsc clocksource has lower latency than reading the
rtc, so favor it in situations where it is synchronized and
stable.  When the tsc is unsynchronized, the rtc needs to be the
chosen clocksource.

Signed-off-by: Dimitri Sivanich <sivanich@sgi.com>
Cc: John Stultz <johnstul@us.ibm.com>
Cc: Jack Steiner <steiner@sgi.com>
Link: http://lkml.kernel.org/r/20120217141641.GA28063@sgi.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
Dimitri Sivanich 2012-02-17 08:16:41 -06:00 committed by Ingo Molnar
parent b01543dfe6
commit b0deca2e02
1 changed files with 1 additions and 5 deletions

View File

@ -37,7 +37,7 @@ static void uv_rtc_timer_setup(enum clock_event_mode,
static struct clocksource clocksource_uv = { static struct clocksource clocksource_uv = {
.name = RTC_NAME, .name = RTC_NAME,
.rating = 400, .rating = 299,
.read = uv_read_rtc, .read = uv_read_rtc,
.mask = (cycle_t)UVH_RTC_REAL_TIME_CLOCK_MASK, .mask = (cycle_t)UVH_RTC_REAL_TIME_CLOCK_MASK,
.flags = CLOCK_SOURCE_IS_CONTINUOUS, .flags = CLOCK_SOURCE_IS_CONTINUOUS,
@ -379,10 +379,6 @@ static __init int uv_rtc_setup_clock(void)
if (!is_uv_system()) if (!is_uv_system())
return -ENODEV; return -ENODEV;
/* If single blade, prefer tsc */
if (uv_num_possible_blades() == 1)
clocksource_uv.rating = 250;
rc = clocksource_register_hz(&clocksource_uv, sn_rtc_cycles_per_second); rc = clocksource_register_hz(&clocksource_uv, sn_rtc_cycles_per_second);
if (rc) if (rc)
printk(KERN_INFO "UV RTC clocksource failed rc %d\n", rc); printk(KERN_INFO "UV RTC clocksource failed rc %d\n", rc);