linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* swapon/swapoff in a loop -- ever-decreasing priority field
@ 2008-07-10 10:54 Vegard Nossum
  2008-07-11  3:17 ` KOSAKI Motohiro
  0 siblings, 1 reply; 4+ messages in thread
From: Vegard Nossum @ 2008-07-10 10:54 UTC (permalink / raw)
  To: linux-mm

Hi,

I find that running swapon/swapoff in a loop will decrement the
"Priority" field of the swap partition once per iteration. This
doesn't seem quite correct, as it will eventually lead to an
underflow.

(Though, by my calculations, it would take around 620 days of constant
swapoff/swapon to reach this condition, so it's hardly a real-life
problem.)

Is this something that should be fixed, though?


Vegard

-- 
"The animistic metaphor of the bug that maliciously sneaked in while
the programmer was not looking is intellectually dishonest as it
disguises that the error is the programmer's own creation."
	-- E. W. Dijkstra, EWD1036

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-07-12  6:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-10 10:54 swapon/swapoff in a loop -- ever-decreasing priority field Vegard Nossum
2008-07-11  3:17 ` KOSAKI Motohiro
2008-07-11 21:25   ` Hugh Dickins
2008-07-12  6:28     ` KOSAKI Motohiro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox