[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [XenPPC] NAP state
On Tue, 2006-10-10 at 13:12 -0400, Amos Waterland wrote: > Just as a sanity check, is the intention is to put the processor in the > NAP state when .sleep() is invoked? Yes. > If so, is the following behavior expected? > > @@ -395,12 +396,34 @@ static void __init __start_xen(multiboot > console_endboot(); > > + while (1) { > + long before, after; > + before = mftb(); sleep(); after = mftb(); > + printk("hid0 = %lx: slept for %ld timebase ticks (%ld seconds)\n", > + mfhid0(), after - before, (after - before) / timebase_freq); > + } > > /* Hide UART from DOM0 if we're using it */ > serial_endboot(); > > (XEN) hid0 = 51010180000000: slept for 1952282840 timebase ticks (9 seconds) > (XEN) hid0 = 51010180000000: slept for 52834590 timebase ticks (0 seconds) > (XEN) hid0 = 51010180000000: slept for 2078791813 timebase ticks (10 seconds) > (XEN) hid0 = 51010180000000: slept for 52797943 timebase ticks (0 seconds) > (XEN) hid0 = 51010180000000: slept for 2078719926 timebase ticks (10 seconds) > (XEN) hid0 = 51010180000000: slept for 52860659 timebase ticks (0 seconds) > (XEN) hid0 = 51010180000000: slept for 2078655488 timebase ticks (10 seconds) > (XEN) hid0 = 51010180000000: slept for 52932165 timebase ticks (0 seconds) > (XEN) hid0 = 51010180000000: slept for 2078598776 timebase ticks (10 seconds) > ... When the decrementer goes off in HV mode, it is set to 0x7fff0000. The decrementer frequency on my Maple seems to be 0x0a6e49c0. At that rate, it should take ~12 seconds for the decrementer to fire again, waking the processor. That seems to match your output. I'm not sure about the zero second results. Perhaps there was an interrupt pending when you went to sleep? I think the UART would be unmasked at that point... We should probably set the decrementer to approx. the time the next Xen timer will fire before going to sleep. -- Hollis Blanchard IBM Linux Technology Center _______________________________________________ Xen-ppc-devel mailing list Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-ppc-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |