lkml.org 
[lkml]   [2021]   [Jul]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v14 011/138] mm/lru: Add folio LRU functions
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 ;-)

\
 
 \ /
  Last update: 2021-07-21 06:10    [W:0.887 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site