From: Hugh Dickins <hughd@google.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
Matthew Wilcox <willy@infradead.org>,
Vlastimil Babka <vbabka@suse.cz>,
Hugh Dickins <hughd@google.com>,
linux-kernel@vger.kernel.org, linux-next@vger.kernel.org,
linux-mm@kvack.org
Subject: [PATCH] mm/munlock: remove fields to fix htmldocs warnings
Date: Mon, 28 Mar 2022 12:57:20 -0700 (PDT) [thread overview]
Message-ID: <d2c8f66d-be8e-7c91-b0c8-b2f7ffb08bec@google.com> (raw)
Stephen reports that 'make htmldocs' currently issues two warnings:
include/linux/mm_types.h:275: warning: Function parameter or member
'__filler' not described in 'folio'
include/linux/mm_types.h:275: warning: Function parameter or member
'mlock_count' not described in 'folio'
Certainly __filler doesn't want documenting there, and all but one use of
mlock_count is through page->mlock_count at present: so I think it's best
just to remove them both from struct folio for now, and sort out the
right way to document folio->mlock_count once that is the one true way.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Fixes: 07ca76067308 ("mm/munlock: maintain page->mlock_count while unevictable")
Signed-off-by: Hugh Dickins <hughd@google.com>
---
include/linux/mm_types.h | 8 +-------
mm/swap.c | 4 ++--
2 files changed, 3 insertions(+), 9 deletions(-)
--- 5.18-pre/include/linux/mm_types.h
+++ linux/include/linux/mm_types.h
@@ -253,13 +253,7 @@ struct folio {
struct {
/* public: */
unsigned long flags;
- union {
- struct list_head lru;
- struct {
- void *__filler;
- unsigned int mlock_count;
- };
- };
+ struct list_head lru;
struct address_space *mapping;
pgoff_t index;
void *private;
--- 5.18-pre/mm/swap.c
+++ linux/mm/swap.c
@@ -1026,13 +1026,13 @@ static void __pagevec_lru_add_fn(struct
folio_clear_active(folio);
folio_set_unevictable(folio);
/*
- * folio->mlock_count = !!folio_test_mlocked(folio)?
+ * page->mlock_count = !!PageMlocked(page)?
* But that leaves __mlock_page() in doubt whether another
* actor has already counted the mlock or not. Err on the
* safe side, underestimate, let page reclaim fix it, rather
* than leaving a page on the unevictable LRU indefinitely.
*/
- folio->mlock_count = 0;
+ folio_page(folio, 0)->mlock_count = 0;
if (!was_unevictable)
__count_vm_events(UNEVICTABLE_PGCULLED, nr_pages);
}
reply other threads:[~2022-03-28 19:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d2c8f66d-be8e-7c91-b0c8-b2f7ffb08bec@google.com \
--to=hughd@google.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-next@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
--cc=vbabka@suse.cz \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox