Re: [Suspend-devel] [PATCH] Allow users to abort image saving
On Sun, Nov 05, 2006 at 12:46:37PM +0100, Rafael J. Wysocki wrote: As far as the interruptible freeing is concerned, is it _really_ that important? Currently the shrinking of memory is common code and I don't think the interruptibility is a good enough reason to make things more complicated than they have to be. At least not _now_. Even if it was my idea to make it interruptible, i agree here :-)) That would be tricky, because they are lost when the memory contents from before the suspend are restored. To print them at the very end we'd have to write them into the swap header, for example. But s2disk could wait for a keypress before powerdown (if debug mode is on). If i'm _not_ debugging a problem, the timings are not too interesting :-) -- Stefan Seyfried QA / RD 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=lnkkid=120709bid=263057dat=121642 ___ Suspend-devel mailing list Suspend-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/suspend-devel
Re: [Suspend-devel] [PATCH] Allow users to abort image saving
Hi! Could memory freeing be separated into separate ioctl()? That would allow us to do interruptible freeing (in small hunks), and allow timing done from userland... Well, I prefer the timing being done by the kernel, because it's easliy grepable in the dmesg output and it can be done for the built-in swsusp in the same way. As far as the interruptible freeing is concerned, is it _really_ that important? Currently the shrinking of memory is common code and I don't think the interruptibility is a good enough reason to make things more complicated than they have to be. At least not _now_. No, it is not important. -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html - 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=lnkkid=120709bid=263057dat=121642 ___ Suspend-devel mailing list Suspend-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/suspend-devel
Re: [Suspend-devel] [PATCH] Allow users to abort image saving
On Monday, 6 November 2006 08:14, Stefan Seyfried wrote: On Sun, Nov 05, 2006 at 12:46:37PM +0100, Rafael J. Wysocki wrote: As far as the interruptible freeing is concerned, is it _really_ that important? Currently the shrinking of memory is common code and I don't think the interruptibility is a good enough reason to make things more complicated than they have to be. At least not _now_. Even if it was my idea to make it interruptible, i agree here :-)) That would be tricky, because they are lost when the memory contents from before the suspend are restored. To print them at the very end we'd have to write them into the swap header, for example. But s2disk could wait for a keypress before powerdown (if debug mode is on). If i'm _not_ debugging a problem, the timings are not too interesting :-) Alternatively, resume can wait for a key after the times get printed. -- You never change things by fighting the existing reality. R. Buckminster Fuller - 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=lnkkid=120709bid=263057dat=121642 ___ Suspend-devel mailing list Suspend-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/suspend-devel
Re: [Suspend-devel] [PATCH] Allow users to abort image saving
On Thu, Nov 02, 2006 at 04:08:20PM +0100, Rafael J. Wysocki wrote: On Thursday, 2 November 2006 13:13, Stefan Seyfried wrote: On Thu, Nov 02, 2006 at 11:29:47AM +0100, Rafael J. Wysocki wrote: On Thursday, 2 November 2006 11:24, Pavel Machek wrote: Hi! The appended patch allows the users of suspend to abort the image saving by pressing Ctrl+c. It would be nice to abort with escape or something... ctrl+c is going to be interesting for users using splashscreen. OK Escape (and f2) switches the splash screen to verbose. I sometimes probably would want to do that without aborting suspend. I'm not sure if the first escape (that switches bootsplash to verbose) is even passed on to the terminal, though. Would need to test that... OK Which key do you prefer? I don't know. Escape sounds pretty logical :-) Go ahead, i don't even know if this is an issue (Holger could probably test what happens to the escape that sends bootsplash into verbose mode, i'm not sure if this one is even propagated to userspace) and if it is, i could still either change the define for the SUSE package or if (bootsplash.is_silent()) ignore_first_esc; something ugly like that. Otherwise it looks okay. Another thing: for me, writing the image actually often consumes much less time than freeing some memory or creating the snapshot does. I understand that aborting during snapshot creation might not be possible, but can we also abort during freeing memory? This is happening in the kernel, so no, we can't. Ok, maybe this is something we should look into later, since i really often see machine freeing memory for 30 seconds, snapshotting for another 20 seconds and then writing for 10 seconds (or at least it feels like that :-). Pavel never has those machines, but i seem to always have, i also always had those that were unusably slow when writing the in-kernel-swsusp image :-) -- Stefan Seyfried QA / RD 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=lnkkid=120709bid=263057dat=121642 ___ Suspend-devel mailing list Suspend-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/suspend-devel
Re: [Suspend-devel] [PATCH] Allow users to abort image saving
On Fri 03. Nov - 14:57:10, Stefan Seyfried wrote: On Thu, Nov 02, 2006 at 04:08:20PM +0100, Rafael J. Wysocki wrote: On Thursday, 2 November 2006 13:13, Stefan Seyfried wrote: On Thu, Nov 02, 2006 at 11:29:47AM +0100, Rafael J. Wysocki wrote: On Thursday, 2 November 2006 11:24, Pavel Machek wrote: Hi! The appended patch allows the users of suspend to abort the image saving by pressing Ctrl+c. It would be nice to abort with escape or something... ctrl+c is going to be interesting for users using splashscreen. OK Escape (and f2) switches the splash screen to verbose. I sometimes probably would want to do that without aborting suspend. I'm not sure if the first escape (that switches bootsplash to verbose) is even passed on to the terminal, though. Would need to test that... OK Which key do you prefer? I don't know. Escape sounds pretty logical :-) Go ahead, i don't even know if this is an issue (Holger could probably test what happens to the escape that sends bootsplash into verbose mode, i'm not sure if this one is even propagated to userspace) and if it is, i could still either change the define for the SUSE package or if (bootsplash.is_silent()) ignore_first_esc; something ugly like that. Bootsplash only drops to verbose mode on escape and F2 as far as I can see. At least the kernel has something like this: --- #ifdef CONFIG_BOOTSPLASH /* This code has to be redone for some non-x86 platforms */ if (down == 1 (keycode == 0x3c || keycode == 0x01)) {/* F2 and ESC on PC keyboard */ extern int splash_verbose(void); printk(KERN_INFO splash_verbose in keyboard.c 1\n); if (splash_verbose()) return; } #endif --- But I agree escape would be more senseable. So why is this an issue at all? Distribution which have bootsplash will have something like press escape to abort in their bootsplash theme anyway. So I don't think that the usual user likes to press the 'abort key' multiple times. If you like to see what's going on, just disable splash in the config file. And if something is going wrong during suspend, the escape key just drops bootsplash to verbose mode and you'll hopefully see the failure messages but then there's nothing to abort anymore anyway ;-) Regards, Holger - 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=lnkkid=120709bid=263057dat=121642 ___ Suspend-devel mailing list Suspend-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/suspend-devel
Re: [Suspend-devel] [PATCH] Allow users to abort image saving
On Friday, 3 November 2006 14:57, Stefan Seyfried wrote: On Thu, Nov 02, 2006 at 04:08:20PM +0100, Rafael J. Wysocki wrote: On Thursday, 2 November 2006 13:13, Stefan Seyfried wrote: On Thu, Nov 02, 2006 at 11:29:47AM +0100, Rafael J. Wysocki wrote: On Thursday, 2 November 2006 11:24, Pavel Machek wrote: Hi! The appended patch allows the users of suspend to abort the image saving by pressing Ctrl+c. It would be nice to abort with escape or something... ctrl+c is going to be interesting for users using splashscreen. OK Escape (and f2) switches the splash screen to verbose. I sometimes probably would want to do that without aborting suspend. I'm not sure if the first escape (that switches bootsplash to verbose) is even passed on to the terminal, though. Would need to test that... OK Which key do you prefer? I don't know. Escape sounds pretty logical :-) Go ahead, i don't even know if this is an issue (Holger could probably test what happens to the escape that sends bootsplash into verbose mode, i'm not sure if this one is even propagated to userspace) and if it is, i could still either change the define for the SUSE package or if (bootsplash.is_silent()) ignore_first_esc; something ugly like that. Otherwise it looks okay. Another thing: for me, writing the image actually often consumes much less time than freeing some memory or creating the snapshot does. I understand that aborting during snapshot creation might not be possible, but can we also abort during freeing memory? This is happening in the kernel, so no, we can't. Ok, maybe this is something we should look into later, since i really often see machine freeing memory for 30 seconds, snapshotting for another 20 seconds and then writing for 10 seconds (or at least it feels like that :-). The freeing of memory for 30 sec. happens if there are lots of slabs before the suspend. The memory shrinker is not good at freeing slab caches, to say the least, but this stuff is quite complicated. Pavel never has those machines, but i seem to always have, i also always had those that were unusably slow when writing the in-kernel-swsusp image :-) The current code (as in 2.6.19-rc4) is reasonably fast, although still slower than the userland with compression (on my boxes). -- You never change things by fighting the existing reality. R. Buckminster Fuller - 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=lnkkid=120709bid=263057dat=121642 ___ Suspend-devel mailing list Suspend-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/suspend-devel
Re: [Suspend-devel] [PATCH] Allow users to abort image saving
Op Thu, 2 Nov 2006 08:07:36 +0100 schreef Rafael J. Wysocki [EMAIL PROTECTED]: Hi, The appended patch allows the users of suspend to abort the image saving by pressing Ctrl+c. Comments welcome. This is not going to work for splashy. We will need wrap the call to 'read' in the splashy structure and let splashy use some alternative. It will not be difficult to do, but I'm a bit busy at the moment. I'll have some time in a week or two. grts Tim - 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=lnkkid=120709bid=263057dat=121642 ___ Suspend-devel mailing list Suspend-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/suspend-devel
Re: [Suspend-devel] [PATCH] Allow users to abort image saving
On Thursday, 2 November 2006 13:13, Stefan Seyfried wrote: On Thu, Nov 02, 2006 at 11:29:47AM +0100, Rafael J. Wysocki wrote: On Thursday, 2 November 2006 11:24, Pavel Machek wrote: Hi! The appended patch allows the users of suspend to abort the image saving by pressing Ctrl+c. It would be nice to abort with escape or something... ctrl+c is going to be interesting for users using splashscreen. OK Escape (and f2) switches the splash screen to verbose. I sometimes probably would want to do that without aborting suspend. I'm not sure if the first escape (that switches bootsplash to verbose) is even passed on to the terminal, though. Would need to test that... OK Which key do you prefer? Otherwise it looks okay. Another thing: for me, writing the image actually often consumes much less time than freeing some memory or creating the snapshot does. I understand that aborting during snapshot creation might not be possible, but can we also abort during freeing memory? This is happening in the kernel, so no, we can't. -- You never change things by fighting the existing reality. R. Buckminster Fuller - 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=lnkkid=120709bid=263057dat=121642 ___ Suspend-devel mailing list Suspend-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/suspend-devel
Re: [Suspend-devel] [PATCH] Allow users to abort image saving
Op Thu, 2 Nov 2006 16:10:04 +0100 schreef Rafael J. Wysocki [EMAIL PROTECTED]: On Thursday, 2 November 2006 14:49, Tim Dijkstra wrote: Op Thu, 2 Nov 2006 08:07:36 +0100 schreef Rafael J. Wysocki [EMAIL PROTECTED]: Hi, The appended patch allows the users of suspend to abort the image saving by pressing Ctrl+c. Comments welcome. This is not going to work for splashy. We will need wrap the call to 'read' in the splashy structure and let splashy use some alternative. It will not be difficult to do, but I'm a bit busy at the moment. I'll have some time in a week or two. Will it break splashy or it just won't work if the splashy is used? I think it just won't work, it will probably not break. But I think it can easily made to work. I'll just have to add a non-blocking read function to libsplashy, which suspend then can call. grts Tim - 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=lnkkid=120709bid=263057dat=121642 ___ Suspend-devel mailing list Suspend-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/suspend-devel
Re: [Suspend-devel] [PATCH] Allow users to abort image saving
On Thu, 2 Nov 2006 17:20:39 +0100 Rafael J. Wysocki [EMAIL PROTECTED] wrote: On Thursday, 2 November 2006 16:55, Tim Dijkstra wrote: Op Thu, 2 Nov 2006 16:10:04 +0100 schreef Rafael J. Wysocki [EMAIL PROTECTED]: On Thursday, 2 November 2006 14:49, Tim Dijkstra wrote: Op Thu, 2 Nov 2006 08:07:36 +0100 schreef Rafael J. Wysocki [EMAIL PROTECTED]: Hi, The appended patch allows the users of suspend to abort the image saving by pressing Ctrl+c. Comments welcome. This is not going to work for splashy. We will need wrap the call to 'read' in the splashy structure and let splashy use some alternative. It will not be difficult to do, but I'm a bit busy at the moment. I'll have some time in a week or two. Will it break splashy or it just won't work if the splashy is used? I think it just won't work, it will probably not break. But I think it can easily made to work. I'll just have to add a non-blocking read function to libsplashy, which suspend then can call. Sounds good, but generally we have two options now: We can apply the patch as is and then add the libsplashy function or we can wait with applying the patch until the libsplashy function is ready. So, if the patch doesn't break splashy, I'd like to apply it and you will add the splashy thing when you have time. Is that acceptable? That's fine with me. grts Tim signature.asc Description: PGP signature - 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=lnkkid=120709bid=263057dat=121642___ Suspend-devel mailing list Suspend-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/suspend-devel
Re: [Suspend-devel] [PATCH] Allow users to abort image saving
On Thursday, 2 November 2006 20:47, Tim Dijkstra wrote: On Thu, 2 Nov 2006 17:20:39 +0100 Rafael J. Wysocki [EMAIL PROTECTED] wrote: On Thursday, 2 November 2006 16:55, Tim Dijkstra wrote: Op Thu, 2 Nov 2006 16:10:04 +0100 schreef Rafael J. Wysocki [EMAIL PROTECTED]: On Thursday, 2 November 2006 14:49, Tim Dijkstra wrote: Op Thu, 2 Nov 2006 08:07:36 +0100 schreef Rafael J. Wysocki [EMAIL PROTECTED]: Hi, The appended patch allows the users of suspend to abort the image saving by pressing Ctrl+c. Comments welcome. This is not going to work for splashy. We will need wrap the call to 'read' in the splashy structure and let splashy use some alternative. It will not be difficult to do, but I'm a bit busy at the moment. I'll have some time in a week or two. Will it break splashy or it just won't work if the splashy is used? I think it just won't work, it will probably not break. But I think it can easily made to work. I'll just have to add a non-blocking read function to libsplashy, which suspend then can call. Sounds good, but generally we have two options now: We can apply the patch as is and then add the libsplashy function or we can wait with applying the patch until the libsplashy function is ready. So, if the patch doesn't break splashy, I'd like to apply it and you will add the splashy thing when you have time. Is that acceptable? That's fine with me. Okay, thanks. I'd like to apply the patch soon so that it can settle down a bit before the release. However, we need to agree on which key should be used to abort the image saving. Stefan, would backspace be splash-safe? Rafael -- You never change things by fighting the existing reality. R. Buckminster Fuller - 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=lnkkid=120709bid=263057dat=121642 ___ Suspend-devel mailing list Suspend-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/suspend-devel
Re: [Suspend-devel] [PATCH] Allow users to abort image saving
Hi! The appended patch allows the users of suspend to abort the image saving by pressing Ctrl+c. It would be nice to abort with escape or something... ctrl+c is going to be interesting for users using splashscreen. OK Escape (and f2) switches the splash screen to verbose. I sometimes probably would want to do that without aborting suspend. I'm not sure if the first escape (that switches bootsplash to verbose) is even passed on to the terminal, though. Would need to test that... Otherwise it looks okay. Another thing: for me, writing the image actually often consumes much less time than freeing some memory or creating the snapshot does. I understand that aborting during snapshot creation might not be possible, but can we also abort during freeing memory? It is doable (not easy), but is it worth it? Abort is there so you don't have to power your machine back up + boot it (30+ seconds)... Freeing memory is still fraction of that. (But I'd probably not refuse a patch :-). Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html - 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=lnkkid=120709bid=263057dat=121642 ___ Suspend-devel mailing list Suspend-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/suspend-devel
Re: [Suspend-devel] [PATCH] Allow users to abort image saving
On Thursday, 2 November 2006 22:43, Pavel Machek wrote: Hi! Sounds good, but generally we have two options now: We can apply the patch as is and then add the libsplashy function or we can wait with applying the patch until the libsplashy function is ready. So, if the patch doesn't break splashy, I'd like to apply it and you will add the splashy thing when you have time. Is that acceptable? That's fine with me. Okay, thanks. I'd like to apply the patch soon so that it can settle down a bit before the release. However, we need to agree on which key should be used to abort the image saving. Stefan, would backspace be splash-safe? Probably yes. Go ahead and apply it, default key is minor detail.. Applied (with backspace as the abort key). Rafael -- You never change things by fighting the existing reality. R. Buckminster Fuller - 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=lnkkid=120709bid=263057dat=121642 ___ Suspend-devel mailing list Suspend-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/suspend-devel
Re: [Suspend-devel] [PATCH] Allow users to abort image saving
On Thu 2006-11-02 23:07:32, Rafael J. Wysocki wrote: On Thursday, 2 November 2006 22:42, Pavel Machek wrote: Hi! The appended patch allows the users of suspend to abort the image saving by pressing Ctrl+c. It would be nice to abort with escape or something... ctrl+c is going to be interesting for users using splashscreen. OK Escape (and f2) switches the splash screen to verbose. I sometimes probably would want to do that without aborting suspend. I'm not sure if the first escape (that switches bootsplash to verbose) is even passed on to the terminal, though. Would need to test that... Otherwise it looks okay. Another thing: for me, writing the image actually often consumes much less time than freeing some memory or creating the snapshot does. I understand that aborting during snapshot creation might not be possible, but can we also abort during freeing memory? It is doable (not easy), but is it worth it? Abort is there so you don't have to power your machine back up + boot it (30+ seconds)... Freeing memory is still fraction of that. (But I'd probably not refuse a patch :-). Heh, last time you were against the keyboard reading from the kernel level. ;-) No, I'm not proposing keyboard reading from kernel level... but... ^C is actually signal delivery... so, if you were careful about only doing _interruptible_ sleeps in free_some_memory(), and handled signals, you could do it. Alternatively, you could export shrink_all_memory to userspace more directly, and call it with slowly increasing demands, checking for keyboard in between (from userland)... Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html - 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=lnkkid=120709bid=263057dat=121642 ___ Suspend-devel mailing list Suspend-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/suspend-devel