Re: Patch 2/2: Add compression support to swsusp.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> @@ -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
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
_______________________________________________
linux-pm mailing list
linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/linux-pm

[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux