From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4DE98C33C8C for ; Mon, 6 Jan 2020 12:53:57 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 19D742146E for ; Mon, 6 Jan 2020 12:53:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 19D742146E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id AB2A08E0005; Mon, 6 Jan 2020 07:53:56 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A62EA8E0001; Mon, 6 Jan 2020 07:53:56 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 979A78E0005; Mon, 6 Jan 2020 07:53:56 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0230.hostedemail.com [216.40.44.230]) by kanga.kvack.org (Postfix) with ESMTP id 7EF778E0001 for ; Mon, 6 Jan 2020 07:53:56 -0500 (EST) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with SMTP id CAD38181AC9CB for ; Mon, 6 Jan 2020 12:53:55 +0000 (UTC) X-FDA: 76347201630.30.alarm97_22433581d6c12 X-HE-Tag: alarm97_22433581d6c12 X-Filterd-Recvd-Size: 3475 Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by imf43.hostedemail.com (Postfix) with ESMTP for ; Mon, 6 Jan 2020 12:53:55 +0000 (UTC) Received: by mail-wr1-f68.google.com with SMTP id t2so49470668wrr.1 for ; Mon, 06 Jan 2020 04:53:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=t7xMGOoliqBVH26UmgyuqhQeBnPvckjJ46nheFVxkwA=; b=L683hWLJ6WoN3tEexZBfdYGXjU7PLRm3Eis6A3yMhytd2GJpJYenjQmmBTU9gtrXca jnbvjLX+pBf37Hat68ct1bxeytbO9Vl7E0k2xWBmHNXcUX06g+hH1WzoS3e1p9fmjK60 K2eh84OUmq2LTFRdSNH60GZk/r81vYM5s8YQiCdkC7hnZnf09/yUX413BfDynDWOwves Vnbn3M2Px4ORrOeeNU07BnoWgPw2DpBk+TNc31vumG/cjkBhRCmDt3CKOKbh376lskRI C+jAw00JxXrNXqJxn0YOFJKhlwcprvqU89o+IEbsWu0rAOaeqTR/WH/odpNlH0nWy1gf CJaw== X-Gm-Message-State: APjAAAWL7chBiR2Xbe1DF3NQAxIvTnRFhDSO9VsX9p46D55kVFQK2lEK tun1rMPHQIspAS1oivXobS4= X-Google-Smtp-Source: APXvYqwMxtymrcYWSyOPaGB4Fu00uGPSoY+lbeOVgXNLZZG5MESHuPVBcrKmLcBDvC2u7vK+30vkmg== X-Received: by 2002:adf:dc8d:: with SMTP id r13mr32266890wrj.357.1578315234331; Mon, 06 Jan 2020 04:53:54 -0800 (PST) Received: from localhost (prg-ext-pat.suse.com. [213.151.95.130]) by smtp.gmail.com with ESMTPSA id j12sm73100799wrt.55.2020.01.06.04.53.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jan 2020 04:53:53 -0800 (PST) Date: Mon, 6 Jan 2020 13:53:52 +0100 From: Michal Hocko To: Luigi Semenzato Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, rafael@kernel.org, akpm@linux-foundation.org, gpike@google.com Subject: Re: [PATCH 1/2] Documentation: clarify limitations of hibernation Message-ID: <20200106125352.GB9198@dhcp22.suse.cz> References: <20191226220205.128664-1-semenzato@google.com> <20191226220205.128664-2-semenzato@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191226220205.128664-2-semenzato@google.com> User-Agent: Mutt/1.12.2 (2019-09-21) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu 26-12-19 14:02:04, Luigi Semenzato wrote: [...] > +Limitations of Hibernation > +========================== > + > +When entering hibernation, the kernel tries to allocate a chunk of memory large > +enough to contain a copy of all pages in use, to use it for the system > +snapshot. If the allocation fails, the system cannot hibernate and the > +operation fails with ENOMEM. This will happen, for instance, when the total > +amount of anonymous pages (process data) exceeds 1/2 of total RAM. > + > +One possible workaround (besides terminating enough processes) is to force > +excess anonymous pages out to swap before hibernating. This can be achieved > +with memcgroups, by lowering memory usage limits with ``echo > > +/dev/cgroup/memory//memory.mem.usage_in_bytes``. However, the latter > +operation is not guaranteed to succeed. I am not familiar with the hibernation process much. But what prevents those allocations to reclaim memory and push out the anonymous memory to the swap on demand during the hibernation's allocations? -- Michal Hocko SUSE Labs