[linux-pm] [PATCH] swsusp: simpler calculation of number of pages in PBE list

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

 



Hi!

> > 	px >= n + x
> > 
> > or
> > 
> > 	(p-1)x >= n
> > 
> > or
> > 
> > 	x >= n / (p-1).
> > 
> > The obvious solution is
> > 
> > 	x = ceiling(n / (p-1)),
> > 
> > so calc_nr should return n + ceiling(n / (p-1)), which is exactly what 
> > Michal's patch computes.
> 
> Nice. :-)
> 
> Could we perhaps add your proof to the Michal's patch as a comment,
> for reference?

No, thanks. It only proves that it is equivalent to old code, but says
nothing about quality of code, and we really do not want to keep old
code around.
								Pavel
-- 
teflon -- maybe it is a trademark, but it should not be.

[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