>vm_swappiness=0 should still try to avoid swapping anon memory Swapping with swappiness=0 depends on vm.watermark_scale_factor. Decrease vm.watermark_scale_factor to avoid swapping and get OOM, and increase vm.watermark_scale_factor to get successful swapping even with swappiness=0. Maybe I misunderstood you and you are solving some new problem?