On Friday, 2 February 2007 13:28, you wrote:
> 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.
Actually, if done carefully, it is a good idea. :-)
If you call it with an invalid command, the kernel should say
"SNAPSHOT_PMOPS: invalid argument <number>" and do nothing, but it will
return -EINVAL instead of -ENOTTY.
> 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 :-(
Yes, but please fix that on top of -mm, or I will when I have some time. When
the patches currently in -mm are merged, we can send your current fix as a
-stable patch.
Greetings,
Rafael
--
If you don't have the time to read,
you don't have the time or the tools to write.
- Stephen King
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/suspend-devel