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.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 03610C4338F for ; Tue, 27 Jul 2021 21:18:37 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5CB7360FEE for ; Tue, 27 Jul 2021 21:18:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5CB7360FEE Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 7838A6B0036; Tue, 27 Jul 2021 17:18:35 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 733786B005D; Tue, 27 Jul 2021 17:18:35 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 649058D0001; Tue, 27 Jul 2021 17:18:35 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0129.hostedemail.com [216.40.44.129]) by kanga.kvack.org (Postfix) with ESMTP id 483736B0036 for ; Tue, 27 Jul 2021 17:18:35 -0400 (EDT) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id D80D31802EB2A for ; Tue, 27 Jul 2021 21:18:34 +0000 (UTC) X-FDA: 78409631748.25.BB5844F Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf15.hostedemail.com (Postfix) with ESMTP id 630FCD00AFD8 for ; Tue, 27 Jul 2021 21:18:34 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 164DA60FED; Tue, 27 Jul 2021 21:18:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1627420713; bh=vrsuZUHarGNvf9RdkDQpMyk5mA0/4F4hlnHq6SdM+Yw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=qoIRcerJm+iTqJT9RloyT7tYKD6oJtvJujrDY8t/CzTccbun57NT0AcoKigxcEjGx Md+6GcyQ1Vlwhsv1TZQuW0bkvZ5yVMEo8ZTuJJPYgm31Aa6/RrtCAA2v3CNr6nMyYf k8B81r2ZMW3WQgfd61GdIQuR4X6iJlorspY+PtRE= Date: Tue, 27 Jul 2021 14:18:32 -0700 From: Andrew Morton To: Evan Green 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 Subject: Re: [PATCH v4] mm: Enable suspend-only swap spaces Message-Id: <20210727141832.86695e7181eb10c6e8fd0191@linux-foundation.org> In-Reply-To: References: <20210726171106.v4.1.I09866d90c6de14f21223a03e9e6a31f8a02ecbaf@changeid> <6ff28cfe-1107-347b-0327-ad36e256141b@redhat.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=qoIRcerJ; spf=pass (imf15.hostedemail.com: domain of akpm@linux-foundation.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 630FCD00AFD8 X-Stat-Signature: owruky5qnjw683rks9383pxr18ydmkcs X-HE-Tag: 1627420714-352241 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, 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?