Thread (11 messages) 11 messages, 4 authors, 2020-02-27

Re: is hibernation usable?

flat view

From: "Rafael J. Wysocki" <rafael@kernel.org>
Date: 2020-02-21 09:04:32
Also in: linux-mm

On Fri, Feb 21, 2020 at 9:49 AM Michal Hocko [off-list ref] wrote:
On Thu 20-02-20 09:38:06, Luigi Semenzato wrote:
quoted
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?
quoted
, 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?
My understanding of the problem is that the size of swap is
(theoretically) sufficient, but it is not used as expected during the
preallocation of image memory.

It was stated in one of the previous messages (not in this thread,
cannot find it now) that swap (of the same size as RAM) was activated
(swapon) right before hibernation, so theoretically that should be
sufficient AFAICS.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help