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 B0E89C433B4 for ; Mon, 19 Apr 2021 13:57:16 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B95E761245 for ; Mon, 19 Apr 2021 13:57:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B95E761245 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 40E7F6B006C; Mon, 19 Apr 2021 09:57:15 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3C03D6B007B; Mon, 19 Apr 2021 09:57:15 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2605E6B007D; Mon, 19 Apr 2021 09:57:15 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0209.hostedemail.com [216.40.44.209]) by kanga.kvack.org (Postfix) with ESMTP id 0D8C86B006C for ; Mon, 19 Apr 2021 09:57:15 -0400 (EDT) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id B2CF3181AEF1A for ; Mon, 19 Apr 2021 13:57:14 +0000 (UTC) X-FDA: 78049268388.23.C5CA5A2 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf29.hostedemail.com (Postfix) with ESMTP id B11DB130 for ; Mon, 19 Apr 2021 13:57:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=/tlWzbdi//qKHyK5G0slZklY9aETTkVqjGgc9+iYW1k=; b=bbtd/diWxYwVeUnaIIgSpmK8iy 16LuY12oWmKiMbef3weaPI7r/YcBBr4LE27B2jbZhIUFY7fvcUlJw1tEMpYiMQajBZvNPZ9gi3bsq 4yTDJRDKxipox9qJH6DY2EAvetdnSJmu9/HoBC9bxse1Bi4EMqBoUN1dMXNTATn4fxOTiw1WX5mf6 qufYE9Lu5YJIjlY3mz/nDYRPiCwaxN+ai8iMF/8KxbnA9l+S+l6iuj4W88djq4Qo6KTe2YWGvFH8H h6vbMatkIn3OaTUBNmkXV6AQEKqVQ8yj9Fal1OwcyAsaQZuM6DWkmgxocgcc1NgaA+Fz/WUyOksdC uYwy12QA==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lYUN6-00DqIB-2k; Mon, 19 Apr 2021 13:56:15 +0000 Date: Mon, 19 Apr 2021 14:55:28 +0100 From: Matthew Wilcox To: Peter Zijlstra Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-cachefs@redhat.com, linux-afs@lists.infradead.org, Christoph Hellwig , Jeff Layton Subject: Re: [PATCH v7 09/28] mm: Create FolioFlags Message-ID: <20210419135528.GC2531743@casper.infradead.org> References: <20210409185105.188284-1-willy@infradead.org> <20210409185105.188284-10-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: B11DB130 X-Stat-Signature: o1eo3qrgi4cpdm3i3zbfygdicqfskmsi Received-SPF: none (infradead.org>: No applicable sender policy available) receiver=imf29; identity=mailfrom; envelope-from=""; helo=casper.infradead.org; client-ip=90.155.50.34 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1618840631-30572 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, Apr 19, 2021 at 03:25:46PM +0200, Peter Zijlstra wrote: > On Fri, Apr 09, 2021 at 07:50:46PM +0100, Matthew Wilcox (Oracle) wrote: > > These new functions are the folio analogues of the PageFlags functions. > > If CONFIG_DEBUG_VM_PGFLAGS is enabled, we check the folio is not a tail > > page at every invocation. Note that this will also catch the PagePoisoned > > case as a poisoned page has every bit set, which would include PageTail. > > > > This saves 1727 bytes of text with the distro-derived config that > > I'm testing due to removing a double call to compound_head() in > > PageSwapCache(). > > I vote for dropping the Camels if we're going to rework all this. I'm open to that. It's a bit of rework now, but easier to do it as part of this than as a separate series. So, concretely: PageReferences() becomes folio_referenced() SetPageReferenced() becomes folio_set_referenced() ClearPageReferenced() becomes folio_clear_referenced() __SetFolioReferenced() becomes __folio_set_referenced() __ClearFolioReferenced() becomes __folio_clear_referenced() TestSetPageReferenced() becomes folio_test_set_referenced() TestClearPageReferenced() becomes folio_test_clear_referenced() We do have some functions already like set_page_writeback(), but I think those can become folio_set_writeback() without doing any harm. We also have page_is_young(), page_is_pfmemalloc(), page_is_guard(), etc. Should it be folio_referenced()? or folio_is_referenced()?