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 85E95C48BF8 for ; Mon, 19 Feb 2024 23:29:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 22C366B007E; Mon, 19 Feb 2024 18:29:44 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1B5B86B0080; Mon, 19 Feb 2024 18:29:44 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 056236B0081; Mon, 19 Feb 2024 18:29:43 -0500 (EST) 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 E124C6B007E for ; Mon, 19 Feb 2024 18:29:43 -0500 (EST) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 81BCFA0598 for ; Mon, 19 Feb 2024 23:29:43 +0000 (UTC) X-FDA: 81810147846.19.49EE3EA Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf20.hostedemail.com (Postfix) with ESMTP id B038C1C000A for ; Mon, 19 Feb 2024 23:29:38 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=wG7Mlzlg; dmarc=none; spf=none (imf20.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1708385381; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=pQGcN+Uz6HGYsAB8kabCZ8iJcwMmaEqSe4r7SLZ/ErI=; b=RcnAcrjjkDXR3DBI0VskvdH6aLvkIXSFrH7ftlWxcFTsViMrboRVesQXzbdXJNSgJzXnv4 mjNu5a0lgoUUFwG2tAmTtdXnR1C01kolhjSPzHiJJ6CRhuPhfYkuY8VSorNV/T5KborDkw YF8ZFja5uUiEXNgGvK7r1dJ3NRZTU2Q= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=wG7Mlzlg; dmarc=none; spf=none (imf20.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1708385381; a=rsa-sha256; cv=none; b=u5xYiG0Zinv44D603R8k26qxxRiSpRbRoKTHTH8jkzykCEp94U0mSxYNDx5bQbkqFLCPVj snxJ9UfrZRboIlVBfh5syRdXKunxQmGKdixjLLGRcODKQ+7u7PgPqTglqPU/1U/N0OG4Gg N9yBl47xEMsAXxe6ZberWyefaCQAkVI= 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=pQGcN+Uz6HGYsAB8kabCZ8iJcwMmaEqSe4r7SLZ/ErI=; b=wG7Mlzlg3GG4pOArHBeQiF0qRp CJovwrEayzlRV4lzGLLQadsbwB/kmJ88QPBmEQG2TY7Uvhqrk1u/HenW4d/pIoNPFmwLIyzTrDjRr 0q8MOyaBQJAlpKxZ7lYNkm2XNtm3RZDLL+zHL72r3bU1a9uYB3ahJWxrKTjlU1R9bGIcVr07A2VBI vl5Onpp8nMtIl5Fs2XEzbFKdKZOHAywXXG+3CPBGq/C6n+vUSdnV5J4QIys6OUlG3NzWI+qR4i5T8 qlZL4lr7UW1K5D0w7Pqh3RQV0J448ka6hiaKyc/SgSZplrLT2FoOllvgM8GiWxjOOiTlbHEGyItyq +ApEy5sQ==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rcD4k-0000000E4PZ-2NTx; Mon, 19 Feb 2024 23:29:30 +0000 Date: Mon, 19 Feb 2024 23:29:30 +0000 From: Matthew Wilcox To: NeilBrown Cc: Mike Rapoport , 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 Message-ID: References: <170838273655.1530.946393725104206593@noble.neil.brown.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <170838273655.1530.946393725104206593@noble.neil.brown.name> X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: B038C1C000A X-Stat-Signature: 31tqdup4jktnbj5xeakf4bk9w79fya6a X-Rspam-User: X-HE-Tag: 1708385378-40830 X-HE-Meta: U2FsdGVkX18Vn1fce1ts2vTGEy0S3mbKxu0pc4BLR5rznZt0z5QkjZE1rFn0qNVb8XklOQS9sfH07mAiCbEmkV9EUpzCIEeHUy27Jq/siyS3OYRM//RDhylRMu8PPUfS8TccKl5Y86NkvupGzSIgVY3wOnpW4L5erPYL/hfm4ULcRQOTuEDDCmDbWt4AwQmFPvjIEVyV57Ko0JRVqmVF00dncLYkvV5md/jcCpBD/d3HM43ITYzc/sdaJ/suUBiQxYpYwz5laMAlwciB0ISdOmmAp8+E1rBepSuITlOpk2+2LjJjeWSjm8gzzs69jMThYI7M+4/NFGewGYlSdggXuLhLsgxY4JsXVLKD1SPSe1V5btGorAN1x5yt5ySQVuwFe17VkIQV1ic/7Ex7Y/buPfE2nPiKS8epIKVmkAm4JQ+524S0TiQckQuS+HpYRyNzOg4hBD7KFXckzcN9PE9igjaTBxBKPakKGpxH93JS2lYE4ecTG0wYkvAciQgFXw69TSevalx8Hhy7o3kXrsKSlsaUJc/yikrrgSaY3uaVIAocK++Ub52H2C4yvPjEVVo7dqWelprMnJ03d8q2ePm9D1S6gUsfN8qewfItfGDUFThiHQExxEfQOjVNe3+V36hsW66WpntVCGQeutgTSS75WKB0qzJ0gdTf+FP27NiEGg3g354tpj9NNNiSLogFXS1fhovAlq/v1rXWokTC5/vXxGkLMsSoNiYGLtcjUbof3sygztOHLK7fh924NFfaUyu4lwSrJpzlhytxNVvdU7tJro5PDuaFI6TI07iQMlEoYU3I1pujyQytYICBZ8Wr9SWCXcXqee3mF6KT11el7+RyQg== 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: List-Subscribe: List-Unsubscribe: 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 ... ?