On Thu 20-02-20 09:38:06, Luigi Semenzato wrote: > I was forgetting: forcing swap by eating up memory is dangerous > because it can lead to unexpected OOM kills Could you be more specific what you have in mind? swapoff causing the OOM killer? > , but you can mitigate that > by giving the memory-eaters a higher OOM kill score. Still, some way > of calling try_to_free_pages() directly from user-level would be > preferable. I wonder if such API has been discussed. No, there is no API to trigger the global memory reclaim. You could start the reclaim by increasing min_free_kbytes but I wouldn't really recommend that unless you know exactly what you are doing and also I fail to see the point. If s2disk fails due to insufficient swap space then how can a pro-active reclaim help in the first place? -- Michal Hocko SUSE Labs