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 98EFEC4320A for ; Tue, 27 Jul 2021 21:20:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7963C60F9C for ; Tue, 27 Jul 2021 21:20:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235237AbhG0VUK (ORCPT ); Tue, 27 Jul 2021 17:20:10 -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?