Re: [RFC PATCH 2/2] PM: hibernate: introduce opportunistic memory reclaim

From: Luigi Semenzato
Date: Mon Jun 08 2020 - 18:23:38 EST


Hi Andrea,

1. This mechanism is quite general. It is possible that, although
hibernation may be an important use, there will be other uses for it.
I suggest leaving the hibernation example and performance analysis,
but not mentioning PM or hibernation in the patch subject.

2. It may be useful to have run_show() return the number of pages
reclaimed in the last attempt. (I had suggested something similar in
https://lore.kernel.org/linux-mm/CAA25o9SxajRaa+ZyhvTYdaKdXokcrNYXgEUimax4sUJGCmRYLA@xxxxxxxxxxxxxx/).

3. It is not clear how much mm_reclaim/release is going to help. If
the preloading of the swapped-out pages uses some kind of LIFO order,
and can batch multiple pages, then it might help. Otherwise demand
paging is likely to be more effective. If the preloading does indeed
help, it may be useful to explain why in the commit message.

Thanks!