Hi! > > > > If you want to do it _right_, write timing info onto disk, then read > > > > it from there. That will not slow the user down, while still telling > > > > them nice statistics when resume is done. Hmmm? > > > > > > where? there's no fs mounted. Is there a place to put it in the swap > > > that won't interfere with anything even after resume? I'll have to look > > > at the disk format for swap. > > > > Just place it into swap header. uswsusp has to rewrite it with > > "original" swap header, so just do it in two phases. > > But please remember that the swap header consists only of one page. ;-) > > Besides, it gets overwritten before the atomic restore, so it would be > quite tricky to transfer the benchmark data to the "restored" suspend.
I do not see the problems: before suspend, swap header says "this is swapspace" suspend image is written, header says "this is image, suspend time was 5 seconds" then comes powerdown, powerup, reading image, and its overwrite with "this is swapspace" then comes atomic restore So let's do: before suspend, swap header says "this is swapspace" suspend image is written, header says "this is image, suspend time was 5 seconds" then comes powerdown, powerup, reading image, and its overwrite with "this is almost swapspace, suspend time was 5 seconds, resume time was 3 seconds" then comes atomic restore then suspend process reads the stats and overwrites header with "this is swapspace". It does not look dangerous to me, and it may be useful for other stuff, too... Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Suspend-devel mailing list Suspend-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/suspend-devel