Is it possible to trigger OOM-killer on forced swapping?

view full story

http://unix.stackexchange.com – Is it possible to have the system preemptively swap out inactive pages (vm.swappiness), but invoke the oom-killer when the system runs out of ram (as opposed to running out of memory) and is forced to swap? The ultimate goal is to keep the system from grinding to a halt when it starts thrashing the disk because of major page faults, but still let inactive pages get swapped out. Another desire would be to configure how much swap memory the system is forced to use before oom-killer triggers. This way the system can dip into swap just a little bit, as long as it doesnt go too far. Or I could s (HowTos)