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.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 B7310C07E9C for ; Wed, 14 Jul 2021 08:00:22 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5B79061374 for ; Wed, 14 Jul 2021 08:00:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5B79061374 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 869586B006C; Wed, 14 Jul 2021 04:00:22 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 840566B0085; Wed, 14 Jul 2021 04:00:22 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6E1A86B0096; Wed, 14 Jul 2021 04:00:22 -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 46D106B006C for ; Wed, 14 Jul 2021 04:00:22 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 39C041807FB73 for ; Wed, 14 Jul 2021 08:00:21 +0000 (UTC) X-FDA: 78360445842.19.ADB0963 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf27.hostedemail.com (Postfix) with ESMTP id C212970009D8 for ; Wed, 14 Jul 2021 08:00:20 +0000 (UTC) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 8EE0022823; Wed, 14 Jul 2021 08:00:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1626249619; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ZA2FMKo94s4usb30QHwB12/TZioc1f+l11L4qEZdChg=; b=I5KeuLY0FF7OsP8T86dtLC+OVmDbMIJOOwGazCjrgeU26cVGVJ/QP6YvzJsAk/JPGVeVk+ bGQaymcZeqYhc3qHGDry3Rp4jK3p9iUzXYqp3MWQn72FlwVYBJ7HH9e9IsMxXwA3kDVLiW 7tB5+RSbNEy9moFZznhpeqZajyC5YNk= Received: from suse.cz (unknown [10.100.201.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 1F2D3A3B90; Wed, 14 Jul 2021 08:00:19 +0000 (UTC) Date: Wed, 14 Jul 2021 10:00:19 +0200 From: Michal Hocko To: David Hildenbrand Cc: Evan Green , Andrew Morton , Pavel Machek , Alex Shi , Alistair Popple , Jens Axboe , Johannes Weiner , Joonsoo Kim , "Matthew Wilcox (Oracle)" , Miaohe Lin , Minchan Kim , Vlastimil Babka , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-api@vger.kernel.org Subject: Re: [PATCH v2] mm: Enable suspend-only swap spaces Message-ID: References: <20210709105012.v2.1.I09866d90c6de14f21223a03e9e6a31f8a02ecbaf@changeid> <30dddfb1-388c-a593-0987-73e821216da9@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=I5KeuLY0; spf=pass (imf27.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.28 as permitted sender) smtp.mailfrom=mhocko@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com X-Rspamd-Server: rspam02 X-Stat-Signature: agj564uherx6b74grg7tojgo9s6n19n4 X-Rspamd-Queue-Id: C212970009D8 X-HE-Tag: 1626249620-423407 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 Wed 14-07-21 09:51:13, David Hildenbrand wrote: [...] > Anyhow, the proposal here does not sound completely crazy to me, although > it's unfortunate how we decided to mangle hibernation and swapping into the > same mechanism originally; a different interface to active "hibernation only > backends" would be cleaner than doing a "swapon ..." without swapping. Completely agreed! And I suspect that a special swap flag just digs that hole even deeper. While the flag might look simple enough now I am a bit worried this will open traps in the future. I am not saying the idea is crazy either, it is just a hack on top of the existing hack and as such it requires a very good reasoning. So far I have heard rather vague justification and I am especially curious about the "no mixing with the regular swapout" concern. It might be very well the case that there are more usecases which would benefit from it. -- Michal Hocko SUSE Labs