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 E4FF6C11F66 for ; Wed, 14 Jul 2021 08:00:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CE3DE61374 for ; Wed, 14 Jul 2021 08:00:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238414AbhGNIDM (ORCPT ); Wed, 14 Jul 2021 04:03:12 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:47896 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238287AbhGNIDL (ORCPT ); Wed, 14 Jul 2021 04:03:11 -0400 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: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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