From: David Hildenbrand <david@redhat.com>
To: Andrew Yang <andrew.yang@mediatek.com>,
SeongJae Park <sj@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>
Cc: wsd_upstream@mediatek.com, casper.lin@mediatek.com,
damon@lists.linux.dev, linux-mm@kvack.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org
Subject: Re: [PATCH] mm/damon/paddr: fix pin page problem
Date: Tue, 21 Feb 2023 11:08:38 +0100 [thread overview]
Message-ID: <1b3e8e88-ed5c-7302-553f-4ddb3400d466@redhat.com> (raw)
In-Reply-To: <20230221090313.15396-1-andrew.yang@mediatek.com>
On 21.02.23 10:03, Andrew Yang wrote:
> From: "andrew.yang" <andrew.yang@mediatek.com>
Nit: I'd suggest a different subject
"mm/damon/paddr: fix missing put_page()"
Fixes: ?
Cc: stable ?
I think a patch from Willy is queued that converts this code into folios.
>
> damon_get_page() would always increase page _refcount and
> isolate_lru_page() would increase page _refcount if the page's lru
> flag is set.
>
> If a unevictable page isolated successfully, there will be two more
> _refcount. The one from isolate_lru_page() will be decreased in
> putback_lru_page(), but the other one from damon_get_page() will be
> left behind. This causes a pin page.
>
> Whatever the case, the _refcount from damon_get_page() should be
> decreased.
>
> Signed-off-by: andrew.yang <andrew.yang@mediatek.com>
> ---
> mm/damon/paddr.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/damon/paddr.c b/mm/damon/paddr.c
> index e1a4315c4be6..56d8abd08fb1 100644
> --- a/mm/damon/paddr.c
> +++ b/mm/damon/paddr.c
> @@ -223,8 +223,8 @@ static unsigned long damon_pa_pageout(struct damon_region *r)
> putback_lru_page(page);
> } else {
> list_add(&page->lru, &page_list);
> - put_page(page);
> }
> + put_page(page);
> }
> applied = reclaim_pages(&page_list);
> cond_resched();
--
Thanks,
David / dhildenb
next prev parent reply other threads:[~2023-02-21 10:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-21 9:03 Andrew Yang
2023-02-21 10:08 ` David Hildenbrand [this message]
2023-02-21 18:35 ` SeongJae Park
2023-02-22 6:26 ` Andrew Yang (楊智強)
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=1b3e8e88-ed5c-7302-553f-4ddb3400d466@redhat.com \
--to=david@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=andrew.yang@mediatek.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=casper.lin@mediatek.com \
--cc=damon@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-mm@kvack.org \
--cc=matthias.bgg@gmail.com \
--cc=sj@kernel.org \
--cc=wsd_upstream@mediatek.com \
/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