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=-1.0 required=3.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 E6181C35640 for ; Fri, 21 Feb 2020 08:49:14 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B5F1E24670 for ; Fri, 21 Feb 2020 08:49:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B5F1E24670 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 865396B0007; Fri, 21 Feb 2020 03:49:13 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 816946B0008; Fri, 21 Feb 2020 03:49:13 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 72B046B000A; Fri, 21 Feb 2020 03:49:13 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0066.hostedemail.com [216.40.44.66]) by kanga.kvack.org (Postfix) with ESMTP id 582FA6B0007 for ; Fri, 21 Feb 2020 03:49:13 -0500 (EST) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id DD9F98248047 for ; Fri, 21 Feb 2020 08:49:12 +0000 (UTC) X-FDA: 76513509744.24.page66_8a9d26f3e2b26 X-HE-Tag: page66_8a9d26f3e2b26 X-Filterd-Recvd-Size: 3492 Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) by imf20.hostedemail.com (Postfix) with ESMTP for ; Fri, 21 Feb 2020 08:49:12 +0000 (UTC) Received: by mail-wr1-f42.google.com with SMTP id y11so1016474wrt.6 for ; Fri, 21 Feb 2020 00:49:12 -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; bh=vdh1pOW7qqgRrMSZGB/WB2aWLiCweGEbhLNKasJ4wr0=; b=k5vhOiszq9nlqHOZ/WSOTzFgl2nyOVY9GUZjEELMn1232fT++9WMdiPzdL+bcK0a8V SLcYtLJD8lojGa+Z3Lz+s/J7zqL5g5QE8lTL97KBw+rf1FKPKCQt1G3W6xYz8JqdSVNS eD9QuvyaGaA4agb1ksMme2CRdXjMK/rqsOEAKjuKpXnRaGD5lVBxiBZYLg8lK7yCb9LU GKWRd5E97EDg8razCEWeAJqR79IOq1sV+8YEiqFl4YX66cxeNa1OgqMxqeY6SUlyLlW4 a8ngkGLYC8nC4Vw1YbSNoq9OegoIIoAEYfiB+FkChia+WCKGvTxPFrOv80VjZEvFBkDF 8ZRQ== X-Gm-Message-State: APjAAAXAXMnj2x0VWgGCmUpy/tdYUm2BKvnV58qrCkzisl7n/pBQsHFg li1D3FdLf23pa2dB0q1WFUA= X-Google-Smtp-Source: APXvYqziC3Fp719mdNhI+e0sUbB4RI4UWaJxY4CRFHc66rKeKuKrzVRLj9qALBn+HrI1zgwlsN4LbA== X-Received: by 2002:adf:b64b:: with SMTP id i11mr50206866wre.58.1582274951554; Fri, 21 Feb 2020 00:49:11 -0800 (PST) Received: from localhost (prg-ext-pat.suse.com. [213.151.95.130]) by smtp.gmail.com with ESMTPSA id y139sm3077189wmd.24.2020.02.21.00.49.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Feb 2020 00:49:10 -0800 (PST) Date: Fri, 21 Feb 2020 09:49:10 +0100 From: Michal Hocko To: Luigi Semenzato Cc: Chris Murphy , Linux Memory Management List , Linux PM Subject: Re: is hibernation usable? Message-ID: <20200221084910.GM20509@dhcp22.suse.cz> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Bogosity: Ham, tests=bogofilter, spamicity=0.000030, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu 20-02-20 09:38:06, Luigi Semenzato wrote: > 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? > , 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? -- Michal Hocko SUSE Labs