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=-3.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 AEB17C433B4 for ; Thu, 22 Apr 2021 15:47:47 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D3D33613AF for ; Thu, 22 Apr 2021 15:47:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D3D33613AF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 0C2C66B0070; Thu, 22 Apr 2021 11:47:46 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 04B206B0071; Thu, 22 Apr 2021 11:47:45 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E56E36B0072; Thu, 22 Apr 2021 11:47:45 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0242.hostedemail.com [216.40.44.242]) by kanga.kvack.org (Postfix) with ESMTP id C5B0C6B0070 for ; Thu, 22 Apr 2021 11:47:45 -0400 (EDT) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 70ADC4DC7 for ; Thu, 22 Apr 2021 15:47:45 +0000 (UTC) X-FDA: 78060433290.28.ADD2A44 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf03.hostedemail.com (Postfix) with ESMTP id E2563C0007D4 for ; Thu, 22 Apr 2021 15:47:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Type:MIME-Version:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:In-Reply-To:References; bh=UdV/xsRrw93wPeJQm6RKQW5H8PJQYFUytR36G8I3Ovs=; b=GInvtbQpV+q1DfmdVS3oUS6+UZ oJOQpNnMhVadvMnLboc/BgbyGoaS2y/02q4Dvr5qx00RrWraMLUi6FpXwt/Qdeon62s0vQIQDJOaF j1fHHu/tF67JR3OMAf0DukLYxweRgxgMIHTjK3xuPYX5oy/Knhm5wQaG8Mplvv6MjpnEwQZFRxjrg ffTLs1D2KBaCfaWOTp0rv5HjkS3k+Jo7LxPAneC6YHV7+OjjNQ/aRxi7XbDLSsc0GWStnE1m78AXN Lh8jH79P0t+0OQCsRvHUf0n2RhSrHFvtbjBosTi7TuuejFtDisiTxJMBlpTjhoufpLKH20HcozL2M uVuyaThw==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lZbXl-000Tl5-4W; Thu, 22 Apr 2021 15:47:29 +0000 Date: Thu, 22 Apr 2021 16:47:05 +0100 From: Matthew Wilcox To: linux-mm@kvack.org, linux-fsdevel@vger.kernel.org Cc: linux-f2fs-devel@lists.sourceforge.net Subject: [RFC] Reclaiming PG_private Message-ID: <20210422154705.GO3596236@casper.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: E2563C0007D4 X-Stat-Signature: m539nwp8i7cfrb3rp5nt98pu68pk85ca Received-SPF: none (infradead.org>: No applicable sender policy available) receiver=imf03; identity=mailfrom; envelope-from=""; helo=casper.infradead.org; client-ip=90.155.50.34 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1619106459-504638 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: We're perenially short of page flags, and I don't really see the need for PG_private to exist. We have 32/64 bits available in page->private, and we don't seem to need the extra bit. Most users store a pointer in page->private, and so PagePrivate() being implemented as page->private != 0 is appropriate. Some users simply SetPagePrivate() and don't touch page->private. Those users could instead set page->private to 1. Do we have any users which want to SetPagePrivate() and want to put a meaningful zero value in page->private? AFS stores a pair of integers in page->private, but the second integer must be greater than the first one, so they can't both be zero. btrfs stores a real or fake pointer. buffer_head filesystems generally store a buffer_head pointer. fscrypt stores a pointer. erofs stores a real or fake pointer. f2fs does set PagePrivate and also set the pointer to NULL, but it's not clear whether that's intentional. iomap stores a pointer. jfs stores a pointer. nfs stores a pointer. ntfs stores a pointer. orangefs stores a pointer. So ... what's going on with f2fs? Does it need to distinguish between a page which has f2fs_set_page_private(page, 0) called on it, and a page which has had f2fs_clear_page_private() called on it?