Hello Lorenzo, please find attached next vmscan.c patch which sums up the delayed swap_out (first patch), the fix for not swapping when nr_pages is reached, and (new) the idea to swap more pages in one call to swap_out if priority gets higher. I have not the slightest idea what all this does to the performance. Especially the "more" swap_out code is a pure try-and-error type of thing. Can you do some testing please? Thanks, Stephan