View Single Post
Posts: 330 | Thanked: 556 times | Joined on Oct 2012
#273
Thanks for attempting to explain this. I have begun looking at your sources to see if I can really understand.

Because, intuitively, there is some confusion.

If you boot the N900, both free and flopswap should report 0% usage. As swap fills up, both would report the same % of swap memory used. I think when things start diverging is when the OS decides to swap off some application's data. Then, free will report an increased % of free swap (the additional swapped off memory, which will likely be fragmented), whereas flopswap will continue reporting the same percentage, which is solely based on the blocks used since the system booted up. Therefore, at this point, flopswap should report less remaining swap than free.

I'm sure I got this wrong somehow, so take it with a huge mountain of salt.

I'll just go through the source carefully.

One question: Can block size in swap be different than 512 Bytes? As when making the swap partitions with gparted and not running mkswap, for example. If so, this might need to be looked into.