linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: NeilBrown <neilb@suse.de>
Cc: Mike Rapoport <rppt@kernel.org>,
	lsf-pc@lists.linux-foundation.org, linux-fsdevel@vger.kernel.org,
	linux-mm@kvack.org, linux-block@vger.kernel.org,
	linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org,
	linux-nvme@lists.infradead.org, bpf@vger.kernel.org
Subject: Re: [LSF/MM/BPF TOPIC] Reclaiming & documenting page flags
Date: Mon, 19 Feb 2024 23:29:30 +0000	[thread overview]
Message-ID: <ZdPkWsxKZN8CvQTN@casper.infradead.org> (raw)
In-Reply-To: <170838273655.1530.946393725104206593@noble.neil.brown.name>

On Tue, Feb 20, 2024 at 09:45:36AM +1100, NeilBrown wrote:
> On Tue, 20 Feb 2024, Matthew Wilcox wrote:
> > The example is filemap_range_has_writeback().  It's EXPORT_SYMBOL_GPL()
> > and it's a helper function for filemap_range_needs_writeback().
> > filemap_range_needs_writeback() has kernel-doc, but nobody should be
> > calling filemap_range_has_writeback() directly, so it shouldn't even
> > exist in the htmldocs.  But we should have a comment on it saying
> > "Use filemap_range_needs_writeback(), don't use this", in case anyone
> > discovers it.  And the existance of that comment should be enough to
> > tell our tools to not flag this as a function that needs kernel-doc.
> > 
> 
> Don't we use a __prefix for internal stuff that shouldn't be used?

No?  Or if we do, we are inconsistent with that convention.  Let's
consider some examples.

__SetPageReferenced -- non-atomic version of SetPageReferenced.
Akin to __set_bit.

__filemap_fdatawrite_range() -- like filemap_fdatawrite_range but
allows the specification of sync_mode

__page_cache_alloc() -- like page_cache_alloc() but takes the gfp mask
directly instead of inferring it from mapping_gfp_mask()

__folio_lock() -- This does fit the "don't call this pattern"!

__set_page_dirty() -- Like set_page_dirty() but allows warn to be
specified.

__filemap_remove_folio() -- Like filemap_remove_folio() but allows it
to be replaced with a shadow entry.

__readahead_folio() -- Another internal one

I mostly confined myself to pagemap.h for this survey, but if you've
conducted a different survey that shows your assertion is generally true
and I've hit on the exceptions to the rule ... ?

  reply	other threads:[~2024-02-19 23:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-29  4:32 [LSF/MM/BPF TOPIC] Reclaiming & documenting page flags Matthew Wilcox
2024-02-02 16:28 ` Matthew Wilcox
2024-02-04 10:39 ` Mike Rapoport
2024-02-04 21:34   ` Matthew Wilcox
2024-02-07 15:51     ` Mike Rapoport
2024-02-19 20:13       ` Matthew Wilcox
2024-02-19 22:45         ` NeilBrown
2024-02-19 23:29           ` Matthew Wilcox [this message]
2024-02-20  0:21             ` NeilBrown
2024-02-20  7:16         ` Hannes Reinecke
2024-02-17 11:57 ` Muhammad Usama Anjum
2024-05-17 21:32 ` Navid

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZdPkWsxKZN8CvQTN@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=bpf@vger.kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=lsf-pc@lists.linux-foundation.org \
    --cc=neilb@suse.de \
    --cc=rppt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).