From: Andrew Morton <akpm@linux-foundation.org>
To: Matthew Wilcox <willy@infradead.org>
Cc: linux-mm@kvack.org, Hugh Dickins <hughd@google.com>
Subject: Re: [PATCH 4/5] mm/vmscan: Convert shrink_active_list() to use a folio
Date: Wed, 13 Jul 2022 11:13:14 -0700 [thread overview]
Message-ID: <20220713111314.86723ac0d01d6e4317f894a1@linux-foundation.org> (raw)
In-Reply-To: <YsyNsP8Bz5BzGwtP@casper.infradead.org>
On Mon, 11 Jul 2022 21:53:04 +0100 Matthew Wilcox <willy@infradead.org> wrote:
> On Fri, Jun 17, 2022 at 04:42:47PM +0100, Matthew Wilcox (Oracle) wrote:
> > @@ -2478,23 +2477,21 @@ static void shrink_active_list(unsigned long nr_to_scan,
> >
> > while (!list_empty(&l_hold)) {
> > struct folio *folio;
> > - struct page *page;
> >
> > cond_resched();
> > folio = lru_to_folio(&l_hold);
> > list_del(&folio->lru);
> > - page = &folio->page;
> >
> > - if (unlikely(!page_evictable(page))) {
> > - putback_lru_page(page);
> > + if (unlikely(!folio_evictable(folio))) {
> > + folio_putback_lru(folio);
> > continue;
> > }
> >
> > if (unlikely(buffer_heads_over_limit)) {
> > - if (page_has_private(page) && trylock_page(page)) {
> > - if (page_has_private(page))
> > - try_to_release_page(page, 0);
> > - unlock_page(page);
> > + if (folio_get_private(folio) && folio_trylock(folio)) {
> > + if (folio_get_private(folio))
> > + filemap_release_folio(folio, 0);
> > + folio_unlock(folio);
> > }
> > }
> >
>
> Hi Andrew. Hugh points out that the above is not an equivalent
> transformation for pages which are in the swapcache. Can you apply
> this fix, or would you like a full patch?
>
> ...
The original is in mm-stable and rebasing that is bad (sigh) so I'll
add this as a standalone patch. So yes, please send along the real
thing.
next prev parent reply other threads:[~2022-07-13 18:13 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-17 15:42 [PATCH 0/5] Convert much of vmscan to folios Matthew Wilcox (Oracle)
2022-06-17 15:42 ` [PATCH 1/5] mm/vmscan: Convert reclaim_clean_pages_from_list() " Matthew Wilcox (Oracle)
2022-06-19 6:38 ` Christoph Hellwig
2022-06-17 15:42 ` [PATCH 2/5] mm/vmscan: Convert isolate_lru_pages() to use a folio Matthew Wilcox (Oracle)
2022-06-19 6:39 ` Christoph Hellwig
2022-06-17 15:42 ` [PATCH 3/5] mm/vmscan: Convert move_pages_to_lru() " Matthew Wilcox (Oracle)
2022-06-19 6:39 ` Christoph Hellwig
2022-06-17 15:42 ` [PATCH 4/5] mm/vmscan: Convert shrink_active_list() " Matthew Wilcox (Oracle)
2022-06-19 6:40 ` Christoph Hellwig
2022-07-11 20:53 ` Matthew Wilcox
2022-07-13 18:13 ` Andrew Morton [this message]
2022-06-17 15:42 ` [PATCH 5/5] mm/vmscan: Convert reclaim_pages() " Matthew Wilcox (Oracle)
2022-06-19 6:40 ` Christoph Hellwig
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=20220713111314.86723ac0d01d6e4317f894a1@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=hughd@google.com \
--cc=linux-mm@kvack.org \
--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