...and it already exists.
I wrote swapd many years ago (first started in 1993), as this question
comes up periodically. The only bit missing is mlock.
I don't use it, but the current version I have is 1.4, available from:
http://www.alfie.demon.co.uk/download/swapd-1.4.tar.gz
I am not actually maintaining it currently, I handed over the reins to
Marc Merlin. I don't have a URL to hand for his work.
-- `O O' | Home: Nick.Holloway@alfie.demon.co.uk http://www.alfie.demon.co.uk/ // ^ \\ | Work: Nick.Holloway@parallax.co.uk- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/