Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp4707659pxv; Tue, 27 Jul 2021 14:21:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy9whzBpaSCllETYBqA1ArHjlO8uQyGdHDJ+eE7VMwcSC7mv8IAIgQQQ206WxExXqhPKM9U X-Received: by 2002:a17:906:72d9:: with SMTP id m25mr24472745ejl.58.1627420914839; Tue, 27 Jul 2021 14:21:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627420914; cv=none; d=google.com; s=arc-20160816; b=kov7G6xyInJGQz+BP1mS94KPXM82SXeoXLRJOIFYhYJfTm5uKWz705NQr+TYBVpPqp I3dD0yVXNf38ca0PYwyhV7Ru158gDsb849xGqhf5AEEQ1tggTbyP1lm/WdvL6RyQsuKf gT9Zyv6KoAD5FBpr3XxqqeZ5EOhiHGrQ3JLpnUdDqpJfReHle7j6KWBesCTqOKeyG1Xx HjnoZTEG115Cykzz8fKd0/RCd7JXSXaJym0vUJhQ4X0OJRMWVX3H0/PazqB3bquYA0/Q VWMImIae41AAbE+05IDA4uWSBYsNnZ+Kuc/tnFVLdv6PXuUJ1wgGs5zuv0418mlx79hq Y8Qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=zHLhKuI+CdryMS7OB8xxbXpQuRittZ1cZQdie/V8rqg=; b=Jx5jV/7AEmUS9k83rV7ExWbH8m0md9U7tDsxgGx8oz7Z1kKIkVLit6LkwCL1k226Bk bwNbuexQ+87gFiV7tMwryT2w2hkZcfR50WlDpsLzseRdPshoe/qAxcNda65CnZ+eVgnr /79Zy50unzyiy9OrItraczLy4zjfFeoSnbqwuLfD1bWtwls2go9bQcSRXCLVACUsV5hz PkV7B/6cXJjrWzMvoErF9gpuxo0nklEhp06PFYth5neGe9GTRrgavrsDn8o6cHPAiWS5 hXzXSR22UeR2s84+PLX4G+571asaUSfxl5WXFzbZmxbXyjNYA5PvkLKSgc+FmatU7nsh GwWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=qoIRcerJ; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g18si3838468ejp.458.2021.07.27.14.21.32; Tue, 27 Jul 2021 14:21:54 -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=@linux-foundation.org header.s=korg header.b=qoIRcerJ; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234986AbhG0VUJ (ORCPT + 99 others); Tue, 27 Jul 2021 17:20:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:37736 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235006AbhG0VT2 (ORCPT ); Tue, 27 Jul 2021 17:19:28 -0400 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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?