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=-6.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_RED 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 89407C4338F for ; Tue, 3 Aug 2021 18:01:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6A09C60F48 for ; Tue, 3 Aug 2021 18:01:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238603AbhHCSBo (ORCPT ); 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-Google-Smtp-Source: ABdhPJxgkInbcnZL6YuiAAHeSyp61HBnoO4GuutTKrb9eq9DFObqyq4keiO5+vnACan75CP7JQOWqQ== 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 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=-6.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_RED 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 13004C4338F for ; Tue, 3 Aug 2021 18:01:32 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4450A60F48 for ; Tue, 3 Aug 2021 18:01:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4450A60F48 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id C4B408D0007; Tue, 3 Aug 2021 14:01:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BFB0C8D0005; Tue, 3 Aug 2021 14:01:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AC2078D0007; Tue, 3 Aug 2021 14:01:30 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0029.hostedemail.com [216.40.44.29]) by kanga.kvack.org (Postfix) with ESMTP id 8E36C8D0005 for ; Tue, 3 Aug 2021 14:01:30 -0400 (EDT) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 3C0CF181E25A6 for ; Tue, 3 Aug 2021 18:01:30 +0000 (UTC) X-FDA: 78434536740.02.0C4C173 Received: from mail-io1-f49.google.com (mail-io1-f49.google.com [209.85.166.49]) by imf23.hostedemail.com (Postfix) with ESMTP id D86DC9006843 for ; Tue, 3 Aug 2021 18:01:29 +0000 (UTC) Received: by mail-io1-f49.google.com with SMTP id r18so25297223iot.4 for ; Tue, 03 Aug 2021 11:01:29 -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=qPbNco5716/rdQddJzGIleR9N7O60+085MpdoaUdwrqkLo0a2LglnPr+8zKMbLjCrq 1ttIOebtyd9AcuqVkWjssZ+FWNH4+2JuKvtvOyofx5Rgugyh2Di4nWliBwNNI++96niM YcSbMcpUNkoay1J2GUjCT7BpSZg0xGiEWs7czmJpvxEJig6/l3iVceWb8z/AfkpdmPIG aSoPVRiWtOzq1L9F2/Gws4FDygkSSwoUt+Mvh6mlzFVHU2B4jhXbp6Vcv1F0Cf7xtMKX 3EoQ+xagghLqUw8pi+fUC+zgqOwUvorvofQg8X4Lwm6mLTgrxBQ+P8V/2+NVF4cGqwns cCBg== X-Gm-Message-State: AOAM532PMITUDD/1355niS64NHDclP/oaL02RvstMp0ALG7lZh2AHN9W 1OICKH+yCVq+hHc4SO7WVUbjr423GuqgNg== X-Google-Smtp-Source: ABdhPJxusjyZ70YELy+bLBZo5wVFcOOgi8t+aSNsboEMkKoY1ZvKxyoIFBbH7c8g75GUHg0KZgHd1A== X-Received: by 2002:a05:6602:2354:: with SMTP id r20mr452507iot.201.1628013688856; Tue, 03 Aug 2021 11:01:28 -0700 (PDT) Received: from mail-io1-f41.google.com (mail-io1-f41.google.com. [209.85.166.41]) by smtp.gmail.com with ESMTPSA id 125sm10205414iow.9.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:27 -0700 (PDT) Received: by mail-io1-f41.google.com with SMTP id h1so25229806iol.9 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" X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: D86DC9006843 Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b=Z4v4AiDH; dmarc=pass (policy=none) header.from=chromium.org; spf=pass (imf23.hostedemail.com: domain of evgreen@chromium.org designates 209.85.166.49 as permitted sender) smtp.mailfrom=evgreen@chromium.org X-Stat-Signature: kf7azps8w6pskcy6s6oexwd1wrs7k4yx X-HE-Tag: 1628013689-673133 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 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