From: Chengming Zhou <zhouchengming@bytedance.com>
To: Yosry Ahmed <yosryahmed@google.com>
Cc: Nhat Pham <nphamcs@gmail.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH 3/6] mm/zswap: stop lru list shrinking when encounter warm region
Date: Fri, 2 Feb 2024 16:12:52 +0800 [thread overview]
Message-ID: <2e6547c6-1bdd-4e27-a573-b866eb8bb305@bytedance.com> (raw)
In-Reply-To: <Zbw0HjFkvMG4PT9l@google.com>
On 2024/2/2 08:15, Yosry Ahmed wrote:
> On Thu, Feb 01, 2024 at 03:49:03PM +0000, Chengming Zhou wrote:
>> When the shrinker encounter an existing folio in swap cache, it means
>> we are shrinking into the warmer region. We should terminate shrinking
>> if we're in the dynamic shrinker context.
>>
>> This patch add LRU_STOP to support this, to avoid overshrinking.
>>
>> Signed-off-by: Chengming Zhou <zhouchengming@bytedance.com>
>
> LGTM with one comment below.
>
> Reviewed-by: Yosry Ahmed <yosryahmed@google.com>
>
>> ---
>> include/linux/list_lru.h | 1 +
>> mm/list_lru.c | 3 +++
>> mm/zswap.c | 4 +++-
>> 3 files changed, 7 insertions(+), 1 deletion(-)
>>
>> diff --git a/include/linux/list_lru.h b/include/linux/list_lru.h
>> index f2882a820690..5633e970144b 100644
>> --- a/include/linux/list_lru.h
>> +++ b/include/linux/list_lru.h
>> @@ -24,6 +24,7 @@ enum lru_status {
>> LRU_SKIP, /* item cannot be locked, skip */
>> LRU_RETRY, /* item not freeable. May drop the lock
>> internally, but has to return locked. */
>> + LRU_STOP, /* stop lru list walking */
>
> nit: Should we add "May drop the lock internally, but has to return
> locked" like LRU_RETRY and LRU_REMOVED_RETRY?
Right, will add.
Thanks.
next prev parent reply other threads:[~2024-02-02 8:13 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-01 15:49 [PATCH 0/6] mm/zswap: optimize zswap lru list Chengming Zhou
2024-02-01 15:49 ` [PATCH 1/6] mm/zswap: add more comments in shrink_memcg_cb() Chengming Zhou
2024-02-01 17:45 ` Johannes Weiner
2024-02-01 23:55 ` Yosry Ahmed
2024-02-02 22:25 ` Nhat Pham
2024-02-01 15:49 ` [PATCH 2/6] mm/zswap: invalidate zswap entry when swap entry free Chengming Zhou
2024-02-01 17:49 ` Johannes Weiner
2024-02-01 20:56 ` Nhat Pham
2024-02-02 0:11 ` Yosry Ahmed
2024-02-02 8:10 ` Chengming Zhou
2024-02-01 15:49 ` [PATCH 3/6] mm/zswap: stop lru list shrinking when encounter warm region Chengming Zhou
2024-02-01 17:51 ` Johannes Weiner
2024-02-01 18:10 ` Nhat Pham
2024-02-02 0:15 ` Yosry Ahmed
2024-02-02 8:12 ` Chengming Zhou [this message]
2024-02-01 15:49 ` [PATCH 4/6] mm/zswap: remove duplicate_entry debug value Chengming Zhou
2024-02-01 17:55 ` Johannes Weiner
2024-02-02 8:18 ` Chengming Zhou
2024-02-02 22:17 ` Yosry Ahmed
2024-02-02 22:28 ` Nhat Pham
2024-02-03 4:29 ` Chengming Zhou
2024-02-01 15:49 ` [PATCH 5/6] mm/zswap: only support zswap_exclusive_loads_enabled Chengming Zhou
2024-02-01 18:12 ` Johannes Weiner
2024-02-02 1:04 ` Yosry Ahmed
2024-02-02 12:57 ` Chengming Zhou
2024-02-02 16:26 ` Johannes Weiner
2024-02-03 4:33 ` Chengming Zhou
2024-02-02 22:15 ` Yosry Ahmed
2024-02-02 22:31 ` Nhat Pham
2024-02-01 15:49 ` [PATCH 6/6] mm/zswap: zswap entry doesn't need refcount anymore Chengming Zhou
2024-02-02 1:11 ` Yosry Ahmed
2024-02-02 13:00 ` Chengming Zhou
2024-02-02 16:28 ` Johannes Weiner
2024-02-02 22:33 ` Nhat Pham
2024-02-02 22:36 ` Yosry Ahmed
2024-02-02 22:44 ` Nhat Pham
2024-02-03 5:09 ` Chengming Zhou
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=2e6547c6-1bdd-4e27-a573-b866eb8bb305@bytedance.com \
--to=zhouchengming@bytedance.com \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nphamcs@gmail.com \
--cc=yosryahmed@google.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