Paging out sleepy processes?

Jeff Garzik
1999-10-20T08:19:32Z

I have a simple app that I run locally that allocates and randomly
dirties a lot of memory all at once, with the intention of forcing Linux
to swap out processes.

How possible/reasonable would it be to add a feature which will swap out
processes that have been asleep for a long time?

IMHO this behavior would default to off, but can be enabled by
specifying the age at which the system should attempt to swap out
processes:

# tell kernel to swap out processes which have been asleep
# longer than N seconds
echo 7200 > /proc/sys/vm/min_sleepy_swap

Is there a way to do this already?

Regards,

Jeff