On Fri, Feb 02, 2007 at 01:11:50PM +0100, Rafael J. Wysocki wrote: > Hi, > > On Friday, 2 February 2007 12:20, Tim Dijkstra wrote: > > Hi, > > > > Could someone please tell me what (stable) kernels have support for: > > > > a) Suspend/Resume with swap files > > Should be in 2.6.19 and later. > > > b) Platform mode instead > > I'm not sure what you mean here ...
i guess it is SNAPSHOT_PMOPS... > > > And is there a easy way to test for swap file support, some /sys entry > > perhaps? > > At run time you can check if the SNAPSHOT_SET_SWAP_AREA ioctl is present > (ie. open /dev/snapshot and try to call the ioctl from it). Unfortunately, calling SNAPSHOT_PMOPS just for testing does not seem like a good idea. I thought about some automatism, that falls back to "shutdown" in suspend.c somehow like that (no real patch): if (use_platform_suspend) { int ret = platform_prepare(snapshot_fd); - if (ret < 0) + if (ret < 0) { fprintf(stderr, "suspend: pm_ops->prepare returned " "error %d\n", ret); + use_platform_suspend = 0; + } } but i was not sure about the side effects. OTOH, the in-kernel method AFAIR simply aborts if pm_ops->prepare is present, but not working, and i never had a report of the kind "platform mode does nothing at all", just "platform mode does not work correctly", so it seems like this case never happens. But IIRC, even platform_prepare is enough to oops a non-ACPI kernel as it is right now :-( -- Stefan Seyfried QA / R&D Team Mobile Devices | "Any ideas, John?" SUSE LINUX Products GmbH, Nürnberg | "Well, surrounding them's out." ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Suspend-devel mailing list Suspend-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/suspend-devel