* Re: [PATCH v14 011/138] mm/lru: Add folio LRU functions [not found] ` <YPfdM9dLEsFXZJgf@kernel.org> @ 2021-07-21 11:23 ` Matthew Wilcox 2021-07-21 14:36 ` Mike Rapoport 0 siblings, 1 reply; 2+ messages in thread From: Matthew Wilcox @ 2021-07-21 11:23 UTC (permalink / raw) To: Mike Rapoport; +Cc: linux-kernel, linux-mm, linux-fsdevel, linux-doc 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: 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) ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v14 011/138] mm/lru: Add folio LRU functions 2021-07-21 11:23 ` [PATCH v14 011/138] mm/lru: Add folio LRU functions Matthew Wilcox @ 2021-07-21 14:36 ` Mike Rapoport 0 siblings, 0 replies; 2+ messages in thread From: Mike Rapoport @ 2021-07-21 14:36 UTC (permalink / raw) To: Matthew Wilcox; +Cc: linux-kernel, linux-mm, linux-fsdevel, linux-doc 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. ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-07-21 14:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20210715033704.692967-1-willy@infradead.org>
[not found] ` <20210715033704.692967-12-willy@infradead.org>
[not found] ` <YPao+syEWXGhDxay@kernel.org>
[not found] ` <YPedzMQi+h/q0sRU@casper.infradead.org>
[not found] ` <YPfdM9dLEsFXZJgf@kernel.org>
2021-07-21 11:23 ` [PATCH v14 011/138] mm/lru: Add folio LRU functions Matthew Wilcox
2021-07-21 14:36 ` Mike Rapoport
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).