[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] Does xen 4.1.0 support high resolution clocksource for tickless kernel (HVM guest)?


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: "Lv, Hui" <hui.lv@xxxxxxxxx>
  • Date: Wed, 20 Apr 2011 16:17:50 +0800
  • Accept-language: en-US
  • Acceptlanguage: en-US
  • Delivery-date: Wed, 20 Apr 2011 01:19:48 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: Acv+1RGjWGfjGc32RzqdGyXenwXQmwAXVHJg
  • Thread-topic: Does xen 4.1.0 support high resolution clocksource for tickless kernel (HVM guest)?

Hi guys

Does anyone know how to assign a high resolution clocksource to a HVM guest?

In my environment, the RHEL6's HVM guest kernel is 2.6.32.12 based, which is 
the tickles kernel. 
I got the timer information of this HVM guest as following: 
When I "cat 
/sys/devices/system/clocksource/clocksource0/available_clocksource", it shows 
three available clocksources:
tsc hpet acpi_pm jiffies
and the current time source is, "cat 
/sys/devices/system/clocksource/clocksource0/current_clocksource"
tsc

However, when I "cat /proc/timer_list":
It shows the resolution as ".resolution: 999848 nsecs", which is low resolution.
The event_handler is tick_handle_periodic, which is not tickles one-shot mode. 
In the periodic mode, it triggers 1000 timer interrupts per second, that will 
bring in some overhead.
The nohz_mode is 0, which means "dynamic ticks" was not enabled.

So, my question is that, can I assign a high resolution timer to HVM guest? How 
can the tickles kernel use non-periodic event handler, like "hrtimer_interrupt"?


Detail Information from "cat /proc/timer_list"
________________________________________________________________________________________________________________
Timer List Version: v0.5
HRTIMER_MAX_CLOCK_BASES: 2
now at 15852107490831 nsecs

cpu: 0
 clock 0:
  .base:       ffff880001e11e88
  .index:      0
  .resolution: 999848 nsecs
  .get_time:   ktime_get_real
  .offset:     0 nsecs
active timers:
 #0: <ffff88007bc69d18>, hrtimer_wakeup, S:01, hrtimer_start_range_ns, java/1147
 # expires at 1304150196954680000-1304150196954730000 nsecs [in 
1304134344847189169 to 1304134344847239169 nsecs]
 #1: <ffff88003766dd18>, hrtimer_wakeup, S:01, hrtimer_start_range_ns, java/1161
 # expires at 1304150263786719000-1304150263786769000 nsecs [in 
1304134411679228169 to 1304134411679278169 nsecs]
 #2: <ffff88007bfafd18>, hrtimer_wakeup, S:01, hrtimer_start_range_ns, java/1160
 # expires at 1304150263789719000-1304150263789769000 nsecs [in 
1304134411682228169 to 1304134411682278169 nsecs]
 clock 1:
  .base:       ffff880001e11ec8
  .index:      1
  .resolution: 999848 nsecs
  .get_time:   ktime_get
  .offset:     0 nsecs
active timers:
 #0: init_task_group, sched_rt_period_timer, S:01, __enqueue_rt_entity, 
swapper/1
 # expires at 15853000000000-15853000000000 nsecs [in 892509169 to 892509169 
nsecs]
 #1: <ffff88007b7bba68>, hrtimer_wakeup, S:01, hrtimer_start_range_ns, 
abrtd/1115
 # expires at 15857231144038-15857331144038 nsecs [in 5123653207 to 5223653207 
nsecs]
 #2: <ffff8800377a3a68>, hrtimer_wakeup, S:01, hrtimer_start_range_ns, 
avahi-daemon/998
 # expires at 17409770144038-17409870144038 nsecs [in 1557662653207 to 
1557762653207 nsecs]
 #3: <ffff88007a0ad918>, hrtimer_wakeup, S:01, hrtimer_start_range_ns, 
rsyslogd/897
 # expires at 86414794559634-86414894559634 nsecs [in 70562687068803 to 
70562787068803 nsecs]
  .expires_next   : 9223372036854775807 nsecs
  .hres_active    : 0
  .nr_events      : 0
  .nr_retries     : 0
  .nr_hangs       : 0
  .max_hang_time  : 0 nsecs
  .nohz_mode      : 0
  .idle_tick      : 0 nsecs
  .tick_stopped   : 0
  .idle_jiffies   : 0
  .idle_calls     : 0
  .idle_sleeps    : 0
  .idle_entrytime : 15852106973443 nsecs
  .idle_waketime  : 0 nsecs
  .idle_exittime  : 0 nsecs
  .idle_sleeptime : 2015652774896 nsecs
  .iowait_sleeptime: 988743384 nsecs
  .last_jiffies   : 0
  .next_jiffies   : 0
  .idle_expires   : 0 nsecs
jiffies: 4310519631

cpu: 1
 clock 0:
  .base:       ffff880001e31e88
  .index:      0
  .resolution: 999848 nsecs
  .get_time:   ktime_get_real
  .offset:     0 nsecs
active timers:
 #0: <ffff88007bcafd18>, hrtimer_wakeup, S:01, hrtimer_start_range_ns, java/1154
 # expires at 1304150196915577000-1304150196915627000 nsecs [in 
1304134344808086169 to 1304134344808136169 nsecs]
 #1: <ffff88007a07fd18>, hrtimer_wakeup, S:01, hrtimer_start_range_ns, 
automount/1090
 # expires at 1304150197124171000-1304150197124221000 nsecs [in 
1304134345016680169 to 1304134345016730169 nsecs]
 #2: <ffff880037493d18>, hrtimer_wakeup, S:01, hrtimer_start_range_ns, 
automount/1089
 # expires at 1304150238123676000-1304150238123726000 nsecs [in 
1304134386016185169 to 1304134386016235169 nsecs]
 #3: <ffff88007baf9d18>, hrtimer_wakeup, S:01, hrtimer_start_range_ns, rs:main 
Q:Reg/1854
 # expires at 1304150245664082612-1304150245664132612 nsecs [in 
1304134393556591781 to 1304134393556641781 nsecs]
 #4: <ffff88007b947d18>, hrtimer_wakeup, S:01, hrtimer_start_range_ns, java/1158
 # expires at 1304152363782719000-1304152363782769000 nsecs [in 
1304136511675228169 to 1304136511675278169 nsecs]
 clock 1:
  .base:       ffff880001e31ec8
  .index:      1
  .resolution: 999848 nsecs
  .get_time:   ktime_get
  .offset:     0 nsecs
active timers:
 #0: <ffff88007b9a7a68>, hrtimer_wakeup, S:01, hrtimer_start_range_ns, hald/1031
 # expires at 15856231144038-15856261114038 nsecs [in 4123653207 to 4153623207 
nsecs]
 #1: <ffff880037ba5a68>, hrtimer_wakeup, S:01, hrtimer_start_range_ns, 
rpcbind/915
 # expires at 15871360185906-15871390185905 nsecs [in 19252695075 to 
19282695074 nsecs]
  .expires_next   : 9223372036854775807 nsecs
  .hres_active    : 0
  .nr_events      : 0
  .nr_retries     : 0
  .nr_hangs       : 0
  .max_hang_time  : 0 nsecs
  .nohz_mode      : 0
  .idle_tick      : 0 nsecs
  .tick_stopped   : 0
  .idle_jiffies   : 0
  .idle_calls     : 0
  .idle_sleeps    : 0
  .idle_entrytime : 15852105792015 nsecs
  .idle_waketime  : 0 nsecs
  .idle_exittime  : 0 nsecs
  .idle_sleeptime : 15827991317141 nsecs
  .iowait_sleeptime: 3221171737 nsecs
  .last_jiffies   : 0
  .next_jiffies   : 0
  .idle_expires   : 0 nsecs
jiffies: 4310519631


Tick Device: mode:     0
Broadcast device
Clock Event Device: hpet
 max_delta_ns:   34359738352
 min_delta_ns:   5000
 mult:           268435456
 shift:          32
 mode:           2
 next_event:     9223372036854775807 nsecs
 set_next_event: hpet_legacy_next_event
 set_mode:       hpet_legacy_set_mode
 event_handler:  tick_handle_periodic_broadcast
tick_broadcast_mask: 00000003
tick_broadcast_oneshot_mask: 00000000


Tick Device: mode:     0
Per CPU device: 0
Clock Event Device: lapic
 max_delta_ns:   1341975280
 min_delta_ns:   2399
 mult:           26847583
 shift:          32
 mode:           1
 next_event:     9223372036854775807 nsecs
 set_next_event: lapic_next_event
 set_mode:       lapic_timer_setup
 event_handler:  tick_handle_periodic

Tick Device: mode:     0
Per CPU device: 1
Clock Event Device: lapic
 max_delta_ns:   1341975280
 min_delta_ns:   2399
 mult:           26847583
 shift:          32
 mode:           1
 next_event:     9223372036854775807 nsecs
 set_next_event: lapic_next_event
 set_mode:       lapic_timer_setup
 event_handler:  tick_handle_periodic

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.