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

Re: [Xen-devel] Xen4.2 S3 regression?



We have a cycle_wakeup script (attached) that programs the RTC

This in itsself is not sufficient, due to interaction with the HPET.
We have an additional patch (see below) to deal with that.

The patch is not the cleanest solution ever, but it works...


diff -r fc9dd79fe91a xen/arch/x86/hpet.c
--- a/xen/arch/x86/hpet.c       Thu Mar 03 17:21:16 2011 -0500
+++ b/xen/arch/x86/hpet.c       Thu Mar 03 17:35:57 2011 -0500
@@ -520,13 +520,28 @@

     if ( index != RTC_REG_B )
         return;
-
+
+    /*
+     *  Wake on RTC alarm does not conflict with hpet.
+     * The HW will wake up the CPU when the RTC alarm kicks off
+     * even thought the interrupt is not routed to the APIC.
+     *
+     * In our distro, xen will always own the interrupt so
+     * that we never disable deep cstates.  We do not run
+     * dom0 apps/drivers that require RTC interrupts other
+     * than wakeup functionality.
+     */
+#if 0
     /* RTC Reg B, contain PIE/AIE/UIE */
     if ( value & (RTC_PIE | RTC_AIE | RTC_UIE ) )
     {
         cpuidle_disable_deep_cstate();
         pv_rtc_handler = NULL;
     }
+#else
+    if ( value & (RTC_PIE | RTC_UIE ) )
+           printk("WARNING: dom0 attempting to use RTC interrupts!\n");
+#endif
 }

 void hpet_broadcast_init(void)


On Thu, Sep 6, 2012 at 9:05 AM, Konrad Rzeszutek Wilk
<konrad.wilk@xxxxxxxxxx> wrote:
> On Thu, Sep 06, 2012 at 07:48:26AM -0400, Ben Guthro wrote:
>> Fantastic!
>>
>> Initial tests are very good, with this dma_msi_ack modification.
>>
>> I've been able to get past the ahci stall, and run through ~10 suspend
>> / resume cycles with this fix.
>> Additional tests are warranted, and I'll run through an automated
>> sleep / wake script I have to make sure this fix holds over time.
>
> How are you automating this? (/me imagines some robotic arm pressing
> the power button every couple of minutes).

Attachment: cycle_wakeup
Description: Binary data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

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