Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp2647362pxy; Tue, 3 Aug 2021 11:21:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwshOsEx1rWRgHC51M8zBcYMj/BbIeHeZrJyZBlqWX9GvDW6WvatAjKPKBbW2+x+uADentP X-Received: by 2002:a05:6e02:5cc:: with SMTP id l12mr1102276ils.60.1628014918009; Tue, 03 Aug 2021 11:21:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628014918; cv=none; d=google.com; s=arc-20160816; b=FqXUi1qY9mDVqsCHGwKyjbaY3X51bgd+RJ0lYW3NgyDv0kib3bPiUOhFbNe3+y+16j IY4Q6lBSQwEaKzixT1nXQKAj/ojEDf8pNvEAjsd85Mpo384XZ3Rc+LXU12wMsOw0fJxI h2SALBXYWSDfjZ7U5Nbrs+m6mhr3N5CtexsFiga7aS4tDJ7owWvxsLrf+am5qyMnasFR /M5QNg0auu+XQwnCIoYI3dngBjcKQ4W9Fr8Scr6PWmcOdGK1yeS2zooYsmjyXkRbJR2j U/r+GGdnrpG0lyOykZfSP+TVBdkVmYl7aGLUBLDeDeFWCvQq+b4khd1v9kDH1R+q/0Ia IpGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=XSgoZaAM9VgXcC1Hrs8ckrp1k3/7KUr3SiJsCaEXetc=; b=gCdXjekxSJF0UdzxjVHGs6o8ZZdZRzhJkerqh4JoenK0RpK++aqombLb1qxCMAvY5m hFinIXmnJ54dMpDIQHcOD9vzX6Ei9fVsT91NlhElpSX//3m1yHshuGN+M12p+0QOZKJI fYByEXD0Yk5gE1lODWYbkGXSisxXgh8Z6NoVJZPM9n1GZCQBmwi53ik1BYE3tEtW1Fwj BQtwryMdKIolAjPevvLriDnyrWr4l4N3yQlP/2m2C9xHMsATpa9Cz1KCktyOEJWXQxHH VIVl0U/rHf0NpAbEIFNn7tXi0doa1D2gs31a1y/PiG56VP8ESG0Z+eILeHQEJRdzyZ+o AfMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Z4v4AiDH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c8si16859659ilq.88.2021.08.03.11.21.45; Tue, 03 Aug 2021 11:21:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Z4v4AiDH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238592AbhHCSBo (ORCPT + 99 others); Tue, 3 Aug 2021 14:01:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238590AbhHCSBl (ORCPT ); Tue, 3 Aug 2021 14:01:41 -0400 Received: from mail-io1-xd2f.google.com (mail-io1-xd2f.google.com [IPv6:2607:f8b0:4864:20::d2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46149C061757 for ; Tue, 3 Aug 2021 11:01:30 -0700 (PDT) Received: by mail-io1-xd2f.google.com with SMTP id d22so1903425ioy.11 for ; Tue, 03 Aug 2021 11:01:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=XSgoZaAM9VgXcC1Hrs8ckrp1k3/7KUr3SiJsCaEXetc=; b=Z4v4AiDHaHTqqraFKHHLdvrPsRbBG9F7ytf00tCteaLiZOuNknNYMPJzznS18Bm+Pr 460vDxF+9logldqTlDGpzQNbpMC5RqWLbOkmBquRDPqywa1NK9sGFE16blXlA4ZdRZxp Uj5ALHXj0kVNy1adYB+GWPYeiIbyRHDMxUGh0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=XSgoZaAM9VgXcC1Hrs8ckrp1k3/7KUr3SiJsCaEXetc=; b=mitMCWiXjX4O+n4NQd6B76+C2K8N/HVi1DZ+q4E0AoYAf4jTH1V1PTg+4qZikkmyqY krl2bWZDj6yITwWlA2iyy9+GEhvNMoKc5+C3cN+ERsYpDRI3g1xauXHnYc3mPMpDIEoj sQ2+fhZwPpQg6bGvtVOwqQ6u5tYk9hwhribPq9WaCuL81x3QptbPwLI8xVBWdp9wrsaq TN8TBFE42LiPL2dNx4pNOKmM9bYWUNlUAnJORM+HpvQJsK0EZTqIOE6AhADyN84KuB68 hKHxdsOtO7f2LmgJX3Qf5l8SQr5ki8ir1UOcCERrFqUoTZbDGZtib/nvO/UMjaxqMhnI kSHg== X-Gm-Message-State: AOAM531MegzN/K7jVlZqSfiN6uJelkW6Rr4afp8eXayNvtMaOkJwZkn1 TXhHSz53Z+QhTph2JYCVo9oroaxOvVCorg== X-Received: by 2002:a5d:938a:: with SMTP id c10mr637899iol.0.1628013689626; Tue, 03 Aug 2021 11:01:29 -0700 (PDT) Received: from mail-io1-f45.google.com (mail-io1-f45.google.com. [209.85.166.45]) by smtp.gmail.com with ESMTPSA id w4sm6802988ior.2.2021.08.03.11.01.27 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 03 Aug 2021 11:01:28 -0700 (PDT) Received: by mail-io1-f45.google.com with SMTP id a13so25236497iol.5 for ; Tue, 03 Aug 2021 11:01:27 -0700 (PDT) X-Received: by 2002:a05:6638:cba:: with SMTP id x26mr16380694jad.98.1628013687178; Tue, 03 Aug 2021 11:01:27 -0700 (PDT) MIME-Version: 1.0 References: <20210726171106.v4.1.I09866d90c6de14f21223a03e9e6a31f8a02ecbaf@changeid> <6ff28cfe-1107-347b-0327-ad36e256141b@redhat.com> <20210727141832.86695e7181eb10c6e8fd0191@linux-foundation.org> In-Reply-To: <20210727141832.86695e7181eb10c6e8fd0191@linux-foundation.org> From: Evan Green Date: Tue, 3 Aug 2021 11:00:51 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4] mm: Enable suspend-only swap spaces To: Andrew Morton Cc: David Hildenbrand , Michal Hocko , Pavel Machek , linux-api@vger.kernel.org, Alex Shi , Alistair Popple , Johannes Weiner , Joonsoo Kim , "Matthew Wilcox (Oracle)" , Miaohe Lin , Minchan Kim , Suren Baghdasaryan , Vlastimil Babka , LKML , linux-mm@kvack.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 27, 2021 at 2:18 PM Andrew Morton wrote: > > On Tue, 27 Jul 2021 09:31:33 -0700 Evan Green wrote: > > > > Pavel just mentioned uswsusp, and I wonder if it would be a possible > > > alternative to this patch. > > > > I think you're right that it would be possible to isolate the > > hibernate image with uswsusp if you avoid using the SNAPSHOT_*SWAP* > > ioctls. But I'd expect performance to suffer noticeably, since now > > every page is making a round trip out to usermode and back. I'd still > > very much use the HIBERNATE_ONLY flag if it were accepted, I think > > there's value to it. > > The uswsusp option makes your patch a performance optimization rather > than a feature-add. And we do like to see quantitative testing results > when considering a performance optimization. Especially when the > performance optimization is a bit icky, putting special-case testing > all over the place, maintenance cost, additional testing effort, etc. > > I do think that diligence demands that we quantify the difference. Is > this a thing you can help with? I'm wrong about the performance. Uswsusp is just as fast, and possibly faster in my use case than kernel-driven hibernate. What's more, uswsusp also helps me solve several additional problems I hadn't tackled yet that were looming in front of me. Thanks all for your patience and thoughtful review on this. Patch withdrawn. -Evan