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

[Xen-devel] [PATCH 0/12] Add basic S3 support to Xen


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
  • Date: Tue, 15 May 2007 22:13:34 +0800
  • Delivery-date: Tue, 15 May 2007 07:12:01 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AceW+ze4jTy/cwRvTW6bszffYc+D+g==
  • Thread-topic: [PATCH 0/12] Add basic S3 support to Xen

        Is now time for accepting new features? Here's updated S3 
patch set for Xen/dom0, based on latest 15017 changeset. 
Comments welcomed.

=========================================
Changes since last version:
        - Rebase to latest 15017
        - X86-64 support
        - Force lazy context sync before cpu goes down
        - S5 poweroff support
        - Several bug fixes observed when running on different machines

=========================================
        Attached patch set is the first support to S3 (suspend to ram)
on Xen environment. Totally 12 patches are attached. All files pulled 
from Linux are based on current xenlinux version (2.6.18).

[Xen specific changes]
[PATCH 1/12] Add suspend/resume to devices owned by Xen
[PATCH 2/12] Pull necessary Linux PM files to Xen
[PATCH 3/12] Provide basic Xen PM infrastructure
[PATCH 4/12] PM interface between dom0 and Xen
[PATCH 5/12] Add HVM support

[Xenlinux specific changes]
[PATCH 6/12] Make kthreads freezable
[PATCH 7/12] Pull Linux PM files to sparse tree
[PATCH 8/12] Enable ACPI sleep in Linux

[Xen SMP related changes]
[PATCH 9/12] Pull Linux CPU hotplug logic to Xen
[PATCH 10/12] Add Xen CPU hotplug support
[PATCH 11/12] Allow vcpu to pause self
[PATCH 12/12] SMP support to Xen PM

        For each patch mail, we also post in the body for easy review, 
except those simply pulling Linux files.

        Thanks a lot to guidance from Jun Nakajima.

=========================================
        Some important notes are attached here, and it's better to read 
them carefully before you try it out, since Linux itself still has much 
thing to do for a stable PM support.

#1. Ensure native linux (with same version as xenlinux) working on 
your environment first. Xen can never be more stable than native 
linux, thus please DO record all the information to make native Linux 
working stably, including kernel configuration changes, environmental 
setting, BIOS setting or any other tricky points you made. Then DO 
apply all these changes/settings to xen environment!!!

#2. SATA driver suspend/resume was unstable in earlier linux 
version, which is said to have full support since 2.6.19. However in 
our side, SATA does work correctly if AHCI is disabled by configuring 
SATA as Enhanced/IDE mode for linux-2.6.18. If you see SATA failure 
unfortunately like "SATA: I/O request error", you have to switch to 
legacy IDE mode, and use traditional IDE drivers to operate disk.

#3. VGA resume is the real boring issue, which may even crash the 
system on some boxes. The best case is that your BIOS support 
automatic VGA post after resume. If yes, congratulations! Or else, 
please read carefully linux-2.6.18/Documentation/power/video.txt, 
which lists some known workaround on some known types. Some 
supplements here:
        a) Xen also support "acpi_sleep=" option. You can add it to the 
xenlinux cmdline if applied. We just verified "acpi_sleep=s3_bios", 
which works on one box but failed another. "acpi_sleep=s3_mode" 
seems no effect on either box we have.

        b) On some boxes, VGA post have to be done in UP mode (For 
xen, it means UP-xenlinux), or else system may crash. S3_bios is a 
choice if applying to your box, since bios call is done in wakeup stub. 
Or else in case you have to use "vbetool post" from user space, one 
possible workaround is to manual unplug other cpus before suspend 
and re-plug them after VGA is resumed by:
                #echo "0" > /sys/devices/system/cpu/cpuN/online
                #echo "mem" > /sys/power/state
                ----After resume to user space----
                #vbetool post
                ----Wait til VGA is fully resumed----
                #echo "1" > /sys/devices/system/cpu/cpuN/online
          I guess such issue may be related to vm86 emulation under 
SMP, for both Xen and Linux. But not sure for now. :-(

#4. Some boxes fail to restart after trying S3, on both native and Xen. 
Need further investigation, which may come from some stale hardware
State from previous S3 operation.

        Just reiterative NOTE here, all above issues apply to both
native 
Linux and Xen. So MAKE SURE you have a STABLE native result first. 
It's better to run some workload when testing stability. For example, 
kernel build is easy to trigger instability when VGA resume method is 
incorrect.

Thanks,
Ke/Kevin

_______________________________________________
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®.