On Thursday, 2 November 2006 23:51, Pavel Machek wrote:
> 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)...

Ah, okay.

Well, I'll leave this challenge to someone else. ;-)

Anyway the idea behind the patch was just to make it possible to abort the
suspend and in a place in which it is relatively 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=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Suspend-devel mailing list
Suspend-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/suspend-devel

Reply via email to