Patch 2/2: Add compression support to swsusp.
Review static int enough_swap(unsigned int nr_pages) · line 445
Quoted 10 lines
(quoted diff) +1
-1@@ -437,7 +439,7 @@ static int enough_swap(unsigned int nr_pages) unsigned int free_swap = count_swap_pages(root_swap, 1); pr_debug("PM: Free swap pages: %u\n", free_swap); - return free_swap > (nr_pages + PAGES_FOR_IO) * 1.01; + return free_swap > (nr_pages + PAGES_FOR_IO) * .6; } /**
This is buggy and was buggy before. We may not use floating point in kernel...
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Hi.
Quoted 8 lines · Pavel Machek
Quoted 8 lines
(quoted diff) +1
-1@@ -437,7 +439,7 @@ static int enough_swap(unsigned int nr_pages) unsigned int free_swap = count_swap_pages(root_swap, 1); pr_debug("PM: Free swap pages: %u\n", free_swap); - return free_swap > (nr_pages + PAGES_FOR_IO) * 1.01; + return free_swap > (nr_pages + PAGES_FOR_IO) * .6; }
Quoted 4 lines
Review static int enough_swap(unsigned int nr_pages) · line 445
Quoted 1 line
(quoted diff) +0
-0/**This is buggy and was buggy before. We may not use floating point in kernel...
Yeah. Already rewritten. I was trying to simplify things for swsusp, but decided I should just do it right first time.
Regards,
Nigel