Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5728985pxv; Wed, 21 Jul 2021 12:27:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/vyXBfynTi7gvle0DdN9tuNL2qy3m9rJUoc06uLJX9BJSDMgUmpdIPj6PmmkjuVil1xLQ X-Received: by 2002:a05:6602:58b:: with SMTP id v11mr20390197iox.70.1626895672502; Wed, 21 Jul 2021 12:27:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626895672; cv=none; d=google.com; s=arc-20160816; b=xt7Gl7HRQOpBiJqkkNQeYNzO2AUgVuHyI4XjpmLl84XFH78/fY24FO6OAF25npXuGP wVgD9ZxKryRfFG4s2eGBk3+UqxIq02VTdBcxbsj0Vz58YVAX6lR6232Gs43q+V6joNaJ 2jhBWfAc27y7AwipwELbV1Y9eeatPwRPjGeUh0/CYy693uoC0Nj/KmAcdyMIAKZTgtVq snssv0HOkQdlmb64M6CBUkTuxsmxN6xbev37eiLcXiHE0jNQP4V0EAsAD1Zs/AHbljXD WkXSQFoQHrHSFWtuBLOGxtEDuqT4T7JmXLhUOvdcKD8FrJss3VR+ubU7s+2V3RjNY2As KhLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=R5+MrtlsH8C85UfkT1ihH1IbtNqD8qFTLn1wP2vd5S0=; b=KyuZ9bln7ed1ZxKvoePT3sRH9MEzDgVvR/VhyhFmrV1vhc69O8W7UfIQt4ylWRe/EG JBWW5lvz2j9R2joWHitea0R1NXzDXiQmtinyHOOxWBPTBoZAO674GIsyOE0+DyBK6Bk+ wUOKV81zPRAogdITxnkmkni9yeyFZn72Mu9ve/ziM6IYnsAEDBDHdIsnwVfY+RKiFIeS gxuVh4+GSSJXNFXJbhUOk1OmJRFyty1MVkqs89I2GJZFE4IhF1bZfUobAs//ZjReBgN2 A1OHWOyAahEw5kqAxr9Aejq0e5EoBtAx0Z73OhREReyHv718Xsd/7CH+A0LTD5+6p8c5 H8pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LU8Bd2+g; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 16si16020741ioe.32.2021.07.21.12.27.41; Wed, 21 Jul 2021 12:27:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LU8Bd2+g; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239103AbhGUNzl (ORCPT + 99 others); Wed, 21 Jul 2021 09:55:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:51426 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231139AbhGUNzi (ORCPT ); Wed, 21 Jul 2021 09:55:38 -0400 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: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.