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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 9B425C433B4 for ; Sun, 2 May 2021 02:31:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 705B0611CA for ; Sun, 2 May 2021 02:31:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231670AbhEBCc3 (ORCPT ); Sat, 1 May 2021 22:32:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230409AbhEBCc3 (ORCPT ); Sat, 1 May 2021 22:32:29 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A82D8C06174A for ; Sat, 1 May 2021 19:31:38 -0700 (PDT) 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: Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org 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.)