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=-3.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 1DD65C07E9B for ; Wed, 21 Jul 2021 04:09:00 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9C296611CE for ; Wed, 21 Jul 2021 04:08:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9C296611CE Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 4D8DF6B0011; Wed, 21 Jul 2021 00:09:00 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4B0346B0036; Wed, 21 Jul 2021 00:09:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 376F06B006C; Wed, 21 Jul 2021 00:09:00 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0083.hostedemail.com [216.40.44.83]) by kanga.kvack.org (Postfix) with ESMTP id 1047E6B0011 for ; Wed, 21 Jul 2021 00:09:00 -0400 (EDT) Received: from smtpin31.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 70D9818478D9A for ; Wed, 21 Jul 2021 04:08:58 +0000 (UTC) X-FDA: 78385264356.31.5F8E9A2 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf17.hostedemail.com (Postfix) with ESMTP id B52A0F002CBC for ; Wed, 21 Jul 2021 04:08:57 +0000 (UTC) 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=yFDcRMBQ9XsC1qxHn+UJuS8ZrSYlG5x1Kh5PLuKmJMM=; b=Gr1SzULnnGzEHXK6kypqZDWO7C vrOl03FrqcqFGSllzzDMuoBfJFUSxiSSH0+/k9RBAqED1necOey9qP7PNmQFxbPp+J/EmQXWNBsVs urySsGyXuGBbtFTNTdgqAhoNUorC3VIbLUGZzOvv1qcDyawykI9SR9ULh546ajG+taCy9VR5SMTxy ox6+JF+dIn/7xFy6QAqAaCLvJujqtgeiY01tSg2lYyToscrnL6KDotjnakXlP442fI4Caql+4Zf/b uTjTzMbrSO/+Kx7LyUv7b+rgDa3eLrVj7sOENRB4s+9ostzfjOIQGwLRTeB2Bp5n5IAdS86mIEm4m vTaFyRTg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1m63XI-008mBJ-8j; Wed, 21 Jul 2021 04:08:47 +0000 Date: Wed, 21 Jul 2021 05:08:44 +0100 From: Matthew Wilcox To: Mike Rapoport Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, Yu Zhao , Christoph Hellwig , David Howells , "Kirill A . Shutemov" 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: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: B52A0F002CBC X-Stat-Signature: agsdq53rcf5z7b8o4q76ipqjhkud54dx Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=Gr1SzULn; dmarc=none; spf=none (imf17.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org X-HE-Tag: 1626840537-46719 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 Tue, Jul 20, 2021 at 01:44:10PM +0300, Mike Rapoport wrote: > It seems mm_inline.h is not a part of generated API docs, otherwise > kerneldoc would be unhappy about missing Return: description. It isn't, but I did add mm_inline.h to Documentation as part of this patch (thanks!) and made this change: /** - * folio_is_file_lru - should the folio be on a file LRU or anon LRU? - * @folio: the folio to test - * - * Returns 1 if @folio is a regular filesystem backed page cache folio - * or a lazily freed anonymous folio (e.g. via MADV_FREE). Returns 0 if - * @folio is a normal anonymous folio, a tmpfs folio or otherwise ram or - * swap backed folio. Used by functions that manipulate the LRU lists, - * to sort a folio onto the right LRU list. + * 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. */ 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 ;-)