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.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,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 B58A6C4338F for ; Fri, 30 Jul 2021 13:16:10 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4DA5D60F01 for ; Fri, 30 Jul 2021 13:16:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4DA5D60F01 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id C00AB8D0003; Fri, 30 Jul 2021 09:16:09 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BB1658D0001; Fri, 30 Jul 2021 09:16:09 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AA1518D0003; Fri, 30 Jul 2021 09:16:09 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0110.hostedemail.com [216.40.44.110]) by kanga.kvack.org (Postfix) with ESMTP id 8F8568D0001 for ; Fri, 30 Jul 2021 09:16:09 -0400 (EDT) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 2E3C6231D9 for ; Fri, 30 Jul 2021 13:16:09 +0000 (UTC) X-FDA: 78419302458.27.0590324 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by imf26.hostedemail.com (Postfix) with ESMTP id BC3D32001501 for ; Fri, 30 Jul 2021 13:16:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1627650968; h=from:from:reply-to:subject:subject: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=T5n9htUTUEDNFMWHlREjCeA6Lm63re0yV9LYwhjCq4c=; b=FvxwJnRIJTUVDMnPJhxIUt70MpGZBBXtAEmSgYGvR75fxbaKY3jXNtdw9m7qHoBJlZ+Zj5 3i0bXcawLqRJHrMw9aLdWSNbVDu8i8HRNkASNuCbBy+mmKqgYvkIfbCbVL7ZxFK7iq0N4+ 4+naBSeN+jUK1qBHKar5fBOJxXFS9WI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-69-2AWqov1LPKuunWD90ncSHg-1; Fri, 30 Jul 2021 09:16:05 -0400 X-MC-Unique: 2AWqov1LPKuunWD90ncSHg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D5B50101C7DD; Fri, 30 Jul 2021 13:15:48 +0000 (UTC) Received: from ws.net.home (ovpn-112-16.ams2.redhat.com [10.36.112.16]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4D3045D9D5; Fri, 30 Jul 2021 13:15:44 +0000 (UTC) Date: Fri, 30 Jul 2021 15:15:41 +0200 From: Karel Zak To: Evan Green Cc: Andrew Morton , Michal Hocko , Pavel Machek , linux-api@vger.kernel.org, David Hildenbrand , Alex Shi , Alistair Popple , Johannes Weiner , Joonsoo Kim , "Matthew Wilcox (Oracle)" , Miaohe Lin , Minchan Kim , Suren Baghdasaryan , Vlastimil Babka , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v4] mm: Enable suspend-only swap spaces Message-ID: <20210730131541.ighhjiazc4agehcy@ws.net.home> References: <20210726171106.v4.1.I09866d90c6de14f21223a03e9e6a31f8a02ecbaf@changeid> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210726171106.v4.1.I09866d90c6de14f21223a03e9e6a31f8a02ecbaf@changeid> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=FvxwJnRI; spf=none (imf26.hostedemail.com: domain of kzak@redhat.com has no SPF policy when checking 216.205.24.124) smtp.mailfrom=kzak@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: BC3D32001501 X-Stat-Signature: z43o1prwhebnnfxyo8uzs9wmmi65ox4n X-HE-Tag: 1627650968-676331 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 Mon, Jul 26, 2021 at 05:12:46PM -0700, Evan Green wrote: > Swap regions with SWAP_FLAG_HIBERNATE_ONLY set will not appear in > /proc/meminfo under SwapTotal and SwapFree, since they are not usable as > general swap. These regions do still appear in /proc/swaps. Off-topic, /proc/swaps is in the same situation like /proc/mounts years ago ... It does not provide all important information like SWAP_FLAG_DISCARD_PAGES SWAP_FLAG_DISCARD_ONCE and SWAP_FLAG_HIBERNATE_ONLY flags. Users will not able to differentiate between regular and hibernate-only devices in "swapon" or "cat /proc/swaps" output ;-( It would be nice to have /proc/swapsinfo with extendible "flags" column. Karel -- Karel Zak http://karelzak.blogspot.com