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=-7.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 734CBC12002 for ; Wed, 21 Jul 2021 14:36:17 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 12021608FE for ; Wed, 21 Jul 2021 14:36:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 12021608FE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 966A76B0072; Wed, 21 Jul 2021 10:36:16 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 916C96B007B; Wed, 21 Jul 2021 10:36:16 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 805196B0080; Wed, 21 Jul 2021 10:36:16 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0250.hostedemail.com [216.40.44.250]) by kanga.kvack.org (Postfix) with ESMTP id 677146B0072 for ; Wed, 21 Jul 2021 10:36:16 -0400 (EDT) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 17CCC1AEC5 for ; Wed, 21 Jul 2021 14:36:16 +0000 (UTC) X-FDA: 78386845152.03.3E44E29 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf23.hostedemail.com (Postfix) with ESMTP id AA8E99009F14 for ; Wed, 21 Jul 2021 14:36:15 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id C1C1D6121F; Wed, 21 Jul 2021 14:36:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626878174; bh=OoSIb5rdAAyByaIH7juDwMpDP+yfFGAa/j+nu8lp9ZA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LU8Bd2+gTsPqudTVI86lm3Oh/Qzy07FrWI+64sn8Kx1kZwH3mcW+yyRDK65iO2SUF bCZgf1XqQMgHdpn1+VUN3LbvMkivGTSjApejKMjMpIm7059FVpFgyMpGd7vKdrld6n +TV3al+pid0aP/b6/Vyw2Q/Nn0B2+aROfZRqmAYpCMNC0CtBk+oc0TJO3dhRUbaOBK vThI48NXQuOLknNVAX3MZ/jWLR+ZUHWkJEIyS1vHFF9IWy6/OKzBGPbWwFDNO39jLR xZjGxD/IEQjnqpT8iFblS+y/59EIaFKnF3/JDGsqwg+0/bSS3Wb2C9HaruyUftPxOh RwJKhAm3Vfv5w== Date: Wed, 21 Jul 2021 17:36:08 +0300 From: Mike Rapoport To: Matthew Wilcox Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-doc@vger.kernel.org Subject: Re: [PATCH v14 011/138] mm/lru: Add folio LRU functions Message-ID: References: <20210715033704.692967-1-willy@infradead.org> <20210715033704.692967-12-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=LU8Bd2+g; spf=pass (imf23.hostedemail.com: domain of rppt@kernel.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=rppt@kernel.org; dmarc=pass (policy=none) header.from=kernel.org X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: AA8E99009F14 X-Stat-Signature: 9zo4uihiww3xkg8dysz8dhzoo7qytdr8 X-HE-Tag: 1626878175-912586 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 Wed, Jul 21, 2021 at 12:23:09PM +0100, Matthew Wilcox wrote: > On Wed, Jul 21, 2021 at 11:39:15AM +0300, Mike Rapoport wrote: > > On Wed, Jul 21, 2021 at 05:08:44AM +0100, Matthew Wilcox wrote: > > > I wanted to turn those last two sentences into a list, but my > > > kernel-doc-fu abandoned me. Feel free to submit a follow-on patch to > > > fix that ;-) > > > > Here it is ;-) > > Did you try it? Here's what that turns into with htmldoc: Yes, but I was so happy to see bullets that I missed the fact they are in the wrong section :( > Description > > We would like to get this info without a page flag, but the state needs > to survive until the folio is last deleted from the LRU, which could be > as far down as __page_cache_release. > > * 1 if folio is a regular filesystem backed page cache folio or a > lazily freed anonymous folio (e.g. via MADV_FREE). > * 0 if folio is a normal anonymous folio, a tmpfs folio or otherwise > ram or swap backed folio. > > Return > > An integer (not a boolean!) used to sort a folio onto the right LRU list > and to account folios correctly. > > Yes, we get a bulleted list, but it's placed in the wrong section! > > Adding linux-doc for additional insight into this problem. > For their reference, here's the input: > > /** > * folio_is_file_lru - Should the folio be on a file LRU or anon LRU? > * @folio: The folio to test. > * > * We would like to get this info without a page flag, but the state > * needs to survive until the folio is last deleted from the LRU, which > * could be as far down as __page_cache_release. > * > * Return: An integer (not a boolean!) used to sort a folio onto the > * right LRU list and to account folios correctly. > * > * - 1 if @folio is a regular filesystem backed page cache folio > * or a lazily freed anonymous folio (e.g. via MADV_FREE). > * - 0 if @folio is a normal anonymous folio, a tmpfs folio or otherwise > * ram or swap backed folio. > */ > static inline int folio_is_file_lru(struct folio *folio) Hmm, there is some contradiction between kernel-doc assumption that anything after a blank line is the default (i.e. Description) section and the sphynx ideas where empty blank lines should be: if ($state == STATE_BODY_WITH_BLANK_LINE && /^\s*\*\s?\S/) { dump_section($file, $section, $contents); $section = $section_default; $new_start_line = $.; $contents = ""; } (from scripts/kernel-doc::process_body()) -- Sincerely yours, Mike.