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.5 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 C6B9FC43461 for ; Sun, 2 May 2021 02:31:42 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 03828611CA for ; Sun, 2 May 2021 02:31:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 03828611CA 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 7A8D66B006E; Sat, 1 May 2021 22:31:41 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 78DB06B0070; Sat, 1 May 2021 22:31:41 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 620706B0071; Sat, 1 May 2021 22:31:41 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0210.hostedemail.com [216.40.44.210]) by kanga.kvack.org (Postfix) with ESMTP id 486C36B006E for ; Sat, 1 May 2021 22:31:41 -0400 (EDT) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id E7A04180ACF84 for ; Sun, 2 May 2021 02:31:40 +0000 (UTC) X-FDA: 78094715160.12.C021329 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf07.hostedemail.com (Postfix) with ESMTP id 14BAFA000396 for ; Sun, 2 May 2021 02:31:38 +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=eSBguyItv6cBKaCQivyQjMD2ZSdaXS6oIRq1PugZn5k=; b=LQ4jRVMllwXtOHodDemjkC7ASq yCAo0ECAvhTcl0Ic2X1H6IgXYLXs5WnYcy9peDpH0GivT50apUTip7PXfkRU+6Gh2kfAYxTXwRHAA hXtGnCAJO7Wd76XrRLx5yr24LGblwP+NdchqKX7QQ1GtlM7zID9h/AdjsNpyWMybKpwDj6axSbRAA f6GeyzYDeBZfe+olIRSjKYS+mSCoi3nJPZiaSKb7tkofEVl3xCWu6YzX/iS3IBeqrYV4aS47ego8m wrwXJMcK7c4+rutCCIrXdUTCAlLlh1T0pTjKTBIsYTbS/HZ1ZXmDN6NfAnZCPnyHFnNgqE75leV8F h1BY5xMQ==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1ld1t3-00DAd8-5w; Sun, 02 May 2021 02:31:19 +0000 Date: Sun, 2 May 2021 03:31:13 +0100 From: Matthew Wilcox To: John Hubbard Cc: Nicholas Piggin , Hugh Dickins , akpm@linux-foundation.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, Linus Torvalds Subject: Re: [PATCH v8.1 00/31] Memory Folios Message-ID: <20210502023113.GX1847222@casper.infradead.org> References: <20210430180740.2707166-1-willy@infradead.org> <1619832406.8taoh84cay.astroid@bobo.none> <20210502001705.GW1847222@casper.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=LQ4jRVMl; dmarc=none; spf=none (imf07.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 14BAFA000396 X-Stat-Signature: 9mbn1jsnxfaug7kj3c8z4fybc1k4ri4i Received-SPF: none (infradead.org>: No applicable sender policy available) receiver=imf07; identity=mailfrom; envelope-from=""; helo=casper.infradead.org; client-ip=90.155.50.34 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1619922698-739722 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 Sat, May 01, 2021 at 05:42:21PM -0700, John Hubbard wrote: > On 5/1/21 5:17 PM, Matthew Wilcox wrote: > > folio_dirty() -- defined in page-flags.h > > would have kernel-doc, would be greppable > > > > folio_test_set_dirty_flag() > > folio_test_clear_dirty_flag() > > __folio_clear_dirty_flag() > > __folio_set_dirty_flag() > > folio_clear_dirty_flag() > > folio_set_dirty_flag() -- generated in filemap.h under #ifndef MODULE > > would not have kernel-doc, would not be greppable, would only be used > > in core vfs and core mm. > > > > folio_mark_dirty() -- declared in mm.h (this is rare; turns out all kinds of > > crap wants to mark pages as being dirty) > > folio_clear_dirty_for_io() -- declared in filemap.h > > already have kernel-doc, are greppable, used by filesystems and sometimes > > other random code. > > Yes, the page dirty stuff is definitely not simple, so it's very good to > move away from the auto-generated names there. Looks like you are down to > just a couple of generated names now, if I'm reading this correctly. Six -- test_set, test_clear, __set, __clear, set, clear. > > I hope the above makes you happy -- everything a filesystem author needs > > gets kernel-doc. People working inside the VM/VFS still get exposed > > If "kernel-doc" is effectively a proxy for "file names are directly visible > in the source code, then I'm a lot happier than I was, yes. :) I'm thinking about this kind of thing for each flag (uptodate was the easiest one to start with because it's already not autogenerated): /** * folio_uptodate - Is this folio up to date? * @folio: The folio. * * The uptodate flag is set on a folio when every byte in the folio is at * least as new as the corresponding bytes on storage. Anonymous folios * are always uptodate. If the folio is not uptodate, some of the bytes * in it may be; see the is_partially_uptodate() address_space operation. */ static inline bool folio_uptodate(struct folio *folio) { ... (um, this is going to increase the patch series significantly. i may not do this until later. there's more important things to get in that are already done and waiting on this initial patch series.)