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=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 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 E563CC4338F for ; Tue, 17 Aug 2021 18:32:39 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 74E7F6103A for ; Tue, 17 Aug 2021 18:32:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 74E7F6103A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ucw.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 0EE2A6B0071; Tue, 17 Aug 2021 14:32:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 09F968D0001; Tue, 17 Aug 2021 14:32:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id ECED86B0073; Tue, 17 Aug 2021 14:32:38 -0400 (EDT) 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 D05576B0071 for ; Tue, 17 Aug 2021 14:32:38 -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 591371846CAC6 for ; Tue, 17 Aug 2021 18:32:38 +0000 (UTC) X-FDA: 78485418396.25.F568900 Received: from jabberwock.ucw.cz (jabberwock.ucw.cz [46.255.230.98]) by imf21.hostedemail.com (Postfix) with ESMTP id C96F8D018742 for ; Tue, 17 Aug 2021 18:32:36 +0000 (UTC) Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id B91051C0B77; Tue, 17 Aug 2021 20:32:33 +0200 (CEST) Date: Tue, 17 Aug 2021 20:32:33 +0200 From: Pavel Machek To: Evan Green Cc: Andrew Morton , David Hildenbrand , Michal Hocko , 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: <20210817183233.GA14518@amd> References: <20210726171106.v4.1.I09866d90c6de14f21223a03e9e6a31f8a02ecbaf@changeid> <6ff28cfe-1107-347b-0327-ad36e256141b@redhat.com> <20210727141832.86695e7181eb10c6e8fd0191@linux-foundation.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="liOOAslEiF7prFVr" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Authentication-Results: imf21.hostedemail.com; dkim=none; dmarc=none; spf=none (imf21.hostedemail.com: domain of pavel@ucw.cz has no SPF policy when checking 46.255.230.98) smtp.mailfrom=pavel@ucw.cz X-Stat-Signature: crz8pcf3inx4rtpmhk3fnki6onbrm8wz X-Rspamd-Queue-Id: C96F8D018742 X-Rspamd-Server: rspam05 X-HE-Tag: 1629225156-157832 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: --liOOAslEiF7prFVr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > > > > 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? >=20 > 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. Great to see uswsusp being used :-). Thanks, Pavel --=20 http://www.livejournal.com/~pavelmachek --liOOAslEiF7prFVr Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAmEcAMEACgkQMOfwapXb+vKT/QCghbi3ZypdUeEfrA2k0why8r3r USoAnjPivJsELW4o50xScy0FwXbf1B7w =MuBX -----END PGP SIGNATURE----- --liOOAslEiF7prFVr--