lkml.org 
[lkml]   [1998]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Software Suspend [was Re: APM "SuspendToDisk" implementation problem]
> Sounds rather interesting, any pointers as to where I could find any
> patches. I really hate seeing that bloody "Unknown Interrupt" message when
> Suspend this laptop and having the thing croak. (BTW I had a 486 laptop
> where this actually worked). At least if not doing are own suspend to
> disk, we could probably get the drivers to be "bullet proof". And hey,
> I'm sure we could have some other benefits to this.
>
> Aaron
> <asethman@mandate-inc.com>
This is not ready that far that I may put it on ftp.
Page saving & releasing is done, I've done the code cleanup so-so but I've
made several "TODO" and "FIXME" entries in my code.

The most important: there are two problems that I can't seem to cope with
right now. The third is to make hw state restoring possible [maybe using
chain_notifier for it [by Alan :)] but I don't remember if it suits me]

So the two problems are [look out scheduler and buffer gurus :)]

1) how to 'revalidate' buffers? They will be out of date, because we
modify page allocation while writing our image [what we have just
duplicated - including not droppable buffers]. And after resume they won't
match.
We could delete the image before restoring pages, but root is r/o and
anyway.. we have to think about possible nfs connections [their pages are
cached, aren't they?].
OR - write them out as they are and by resuming get them again. [Any
option is probably bad if we boot up _without_ resuming and writing our
root partition? the same with nfs. So we really should revalidate somehow]

2) On shrinking memory [to swap] I did call try_to_free_pages with gfp
mask __GFP_WAIT. And it slept [of course :)]. So other processes were
still running :(. [my mpeg player e.g.]. How to disable them? [It made an
endless loop of swapping out/in :I :)].
If I make them TASK_INTERRUPTIBLE then they may wake up because they were
already in another wait_queue. If I make them TASK_UNITERRUPTIBLE then by
resuming I should we all processes and if it doesn't check if it is
happened what it's been waiting for there may be definitely problems.

I was thinking of a shortcut in schedule() [if suspeinding is in progress
then don't run any other process than the suspending one] But it's _ugly_.

The other idea was that I don't wait for I/O in shrink_memory [so calling
ll_rw_block won't cause wait_on_page] but I call directly
run_task_queue(tq_disk). But this may be buggy later when eg. in ide.c
in waiting for disk to be ready that may sleep for about half a second.
[look at the note].

I'm working on 2.1.125, I haven't taken a look what has changed since
then. [I know of scheduling issues].

Seasons
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
"One who has time to complain has time to submit patches." <chinese proverb>
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/




-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:45    [from the cache]
©2003-2011 Jasper Spaans