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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3BB44C433F5 for ; Mon, 23 May 2022 06:38:35 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A3E7D6B0005; Mon, 23 May 2022 02:38:34 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9EEE46B0006; Mon, 23 May 2022 02:38:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9047A6B0007; Mon, 23 May 2022 02:38:34 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 806F96B0005 for ; Mon, 23 May 2022 02:38:34 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 4923420F9F for ; Mon, 23 May 2022 06:38:34 +0000 (UTC) X-FDA: 79496054148.10.A149448 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf27.hostedemail.com (Postfix) with ESMTP id 9664440012 for ; Mon, 23 May 2022 06:38:30 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 4CB60B80EF6; Mon, 23 May 2022 06:38:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7DC1BC385A9; Mon, 23 May 2022 06:38:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1653287911; bh=IxV2xEnELBCWTNVkpfzlHZTWu9iVcgmoMIakHEHqRiw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ccpuctTadwS6Yaj3W5zy3j2oITInf+y3bPwvoWgXDbWP18rRJnGDgi8aJxaMfE8kn sp+bIuUpfJAg23YSleajy0XRPwbhN21Z67DjSbf7OdzB0M+7xFlkKwe5Q0f72nz6G1 gpELVl8fLcbBOgDTlzZGq0FVEfd5pWrOUwI4eIm++70DsaS07dHGWgrvXAzEiasiIT pe8qBrGhytzU84KsmSYf2Pa0R8qUKJr2cjXC27ItZgGPXqJzSfCrcFlNRHs+ds/E7U z9vFI/JGtcVT0XWEbzJGAZK9EUvgCP5ldHkffX/6hdTbO4VSRT3IgwfVy/DtpJkCIs 92E3hsi9LyEWw== Date: Mon, 23 May 2022 09:38:23 +0300 From: Mike Rapoport To: Matthew Wilcox Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Subject: Re: Freeing page flags Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 9664440012 X-Rspam-User: Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=ccpuctTa; spf=pass (imf27.hostedemail.com: domain of rppt@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=rppt@kernel.org; dmarc=pass (policy=none) header.from=kernel.org X-Stat-Signature: iotbx5fm7doh51yqogxryhe8ai8xpr3s X-HE-Tag: 1653287910-887658 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 Thu, May 12, 2022 at 09:54:59PM +0100, Matthew Wilcox wrote: > The LWN writeup [1] on merging the MGLRU reminded me that I need to send > out a plan for removing page flags that we can do without. > > 4. I think I can also consolidate PG_slab and PG_reserved into a "single > bit" (not really, but change the encoding so that effectively they only > take a single bit). PG_reserved could be a PageType, AFAIR no reserved pages are ever mapped to userspace > That gives us 4 bits back, which should relieve the pressure on page flag > bits for a while. I have Thoughts on PG_private_2 and PG_owner_priv_1, > as well as a suspicion that not all combinations of referenced, lru, > active, workingset, reclaim and unevictable are possible, and there > might be scope for a better encoding. But I don't know that we need to > do that work; gaining back 4 bits is already a Big Deal. > > I'm slowly doing the PG_private transition as part of the folio work. > For example, eagle eyed reviewers may have spotted that there is no > folio_has_buffers(). Converted code calls folio_buffers() and checks > if it's NULL. Help from filesystem maintainers on removing the uses of > PG_error gratefully appreciated. > > [1] https://lwn.net/Articles/894859/ > -- Sincerely yours, Mike.