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=-8.4 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL 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 3B3BFECE58B for ; Thu, 3 Oct 2019 17:16:49 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id F07092133F for ; Thu, 3 Oct 2019 17:16:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="G3ASLRoJ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F07092133F Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 769136B0005; Thu, 3 Oct 2019 13:16:48 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 71AC76B0006; Thu, 3 Oct 2019 13:16:48 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6073A8E0003; Thu, 3 Oct 2019 13:16:48 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0124.hostedemail.com [216.40.44.124]) by kanga.kvack.org (Postfix) with ESMTP id 3A41F6B0005 for ; Thu, 3 Oct 2019 13:16:48 -0400 (EDT) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with SMTP id D77D4180AD7C3 for ; Thu, 3 Oct 2019 17:16:47 +0000 (UTC) X-FDA: 76003128054.12.death15_115a5b57fc5d X-HE-Tag: death15_115a5b57fc5d X-Filterd-Recvd-Size: 4186 Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) by imf49.hostedemail.com (Postfix) with ESMTP for ; Thu, 3 Oct 2019 17:16:47 +0000 (UTC) Received: by mail-wr1-f53.google.com with SMTP id y19so3617909wrd.3 for ; Thu, 03 Oct 2019 10:16:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=ARGc5hsCWO2LIICH9XSHrLKtJwndxT0zdaD4rPc580E=; b=G3ASLRoJnvVGtAZvNxn/jlNRASqxQfh7UWoOVsJ8S+2Qo0cV7yFAAHb1WCxs6baMjA QczvVeXms5ADRDSQXioi1srZ9lR2HxCbcNvsfNrfRbPgW06MiVuYunZ9xRPxqWcUoAgb CvGXqNkvOQlXUPLTZbldGWfVfAZlr1kl1CIFehrPMGhrC258YOtSw1jECGY4imcczix8 fWXOwGpy2vzqLiKQPFY4Egv0G/r3vtkIqpGkKTXL9MveySG8RN4qanZzVdM0WU9CtxFG 1N1mneQh69P8+I9199eYBW0Cy3HYC7SULgO0zcXgSy4a05Jz/sYm8ChtqVH7s5MSYFgY 0V/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=ARGc5hsCWO2LIICH9XSHrLKtJwndxT0zdaD4rPc580E=; b=fBARu3YSIBubeVwzdlR/mMIT/smKRRb6b6gOpF0Fv4FXj9y27fGpO6FydRjPjYS1+1 0Kc3EDGZG87pZB6ZzyYIXVTel4FhvrVVhE4g5ale5Zs7n1VyVmJFfDR8xSkEwbi5/o2V Zfg50BDIZ4c4Dlh/tEMKq7HR0LWSS9ILRQcpXU8qR7oZLdsw+xITcUfoC7Or/m/THRJj cJuv9D7lDz45cOE8fmn5OjWOltWS7uLdT8NHnrqqT+Cb8yx4yOrsJyRkS69KmZjVpN5c AL7kHaD64rLqeEeS5JP974jJ2Kc2icKKK4aBzlmVF5X8m3643qnC0yqU7s9AiKuaPXiT uBVw== X-Gm-Message-State: APjAAAU8vXkxiPjhYlRiQxRq+3CG5npF20uI8ruFXuHToF4TxoCb96sx Cy5+yFdRxwiaSwRpqEirbEx4fP+0+VOcjk35BzNPV4q6Egk= X-Google-Smtp-Source: APXvYqyz05fCPj4t4Enw2fmuLk889ppK6icCF/AALosgBSqPI9iOglqiwYP6pySDh/q5ZsB7WxTo3IHdOtPCXbolpyY= X-Received: by 2002:adf:fec9:: with SMTP id q9mr8324961wrs.239.1570123005110; Thu, 03 Oct 2019 10:16:45 -0700 (PDT) MIME-Version: 1.0 From: Luigi Semenzato Date: Thu, 3 Oct 2019 10:16:33 -0700 Message-ID: Subject: hibernation memory usage To: Linux Memory Management List , Bas Nowaira , Geoff Pike Content-Type: multipart/alternative; boundary="000000000000f9da47059404bfb7" X-Bogosity: Ham, tests=bogofilter, spamicity=0.000032, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: --000000000000f9da47059404bfb7 Content-Type: text/plain; charset="UTF-8" Hi, I am working on a project that uses hibernation, and we've noticed occasional failures with "echo disk > /sys/power/state" returning ENOMEM. I added some logging and noticed that the failures seem to correlate with total anonymous pages being approximately 1/2 of total RAM. The allocation strategy isn't explicitly documented and the code is a bit tricky (as usual), but I am getting the sense that a copy of the entire RAM in use is made prior to saving it to disk. Is it the case then that hibernation is guaranteed to fail if anon memory is more than 50% of RAM? Since tasks are frozen, that memory cannot change and the copy seems redundant (except it probably makes things simpler). Thanks! --000000000000f9da47059404bfb7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

I am working on a project that uses= hibernation, and we've noticed occasional failures with "echo dis= k > /sys/power/state" returning ENOMEM.=C2=A0 I added some logging = and noticed that the failures seem to correlate with total anonymous pages = being approximately 1/2 of total RAM.=C2=A0 The allocation strategy isn'= ;t explicitly documented and the code is a bit tricky (as usual), but I am = getting the sense that a copy of the entire RAM in use is made prior to sav= ing it to disk.=C2=A0 Is it the case then that hibernation is guaranteed to= fail if anon memory is more than 50% of RAM?=C2=A0 Since tasks are frozen,= that memory cannot change and the copy seems redundant (except it probably= makes things simpler).

Thanks!
--000000000000f9da47059404bfb7--