All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chengming Zhou <chengming.zhou@linux.dev>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: yosryahmed@google.com, nphamcs@gmail.com,
	akpm@linux-foundation.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org,
	Chengming Zhou <zhouchengming@bytedance.com>
Subject: Re: [PATCH 1/2] mm/zswap: don't return LRU_SKIP if we have dropped lru lock
Date: Sat, 27 Jan 2024 22:33:49 +0800	[thread overview]
Message-ID: <76b9e52a-9b51-4e4d-93ca-24a5aa3c4dca@linux.dev> (raw)
In-Reply-To: <20240126142800.GF1567330@cmpxchg.org>

On 2024/1/26 22:28, Johannes Weiner wrote:
> On Fri, Jan 26, 2024 at 08:30:14AM +0000, chengming.zhou@linux.dev wrote:
>> From: Chengming Zhou <zhouchengming@bytedance.com>
>>
>> LRU_SKIP can only be returned if we don't ever dropped lru lock, or
>> we need to return LRU_RETRY to restart from the head of lru list.
> 
> Good catch. Can you mention the possible consequences in the log?
> 
> "Otherwise, the iteration might continue from a cursor position that
> was freed while the locks were dropped."?

Good, will do.

> 
>> Actually we may need to introduce another LRU_STOP to really terminate
>> the ongoing shrinking scan process, when we encounter a warm page
>> already in the swap cache. The current list_lru implementation
>> doesn't have this function to early break from __list_lru_walk_one.
>>
>> Fixes: b5ba474f3f51 ("zswap: shrink zswap pool based on memory pressure")
>> Signed-off-by: Chengming Zhou <zhouchengming@bytedance.com>
> 
> Acked-by: Johannes Weiner <hannes@cmpxchg.org>

Thanks.


  reply	other threads:[~2024-01-27 14:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-26  8:30 [PATCH 1/2] mm/zswap: don't return LRU_SKIP if we have dropped lru lock chengming.zhou
2024-01-26  8:30 ` [PATCH 2/2] mm/zswap: fix race between lru writeback and swapoff chengming.zhou
2024-01-26 15:31   ` Johannes Weiner
2024-01-26 19:31     ` Nhat Pham
2024-01-27 14:53     ` Chengming Zhou
2024-01-26 19:50   ` Nhat Pham
2024-01-27 15:12     ` Chengming Zhou
2024-01-26 14:28 ` [PATCH 1/2] mm/zswap: don't return LRU_SKIP if we have dropped lru lock Johannes Weiner
2024-01-27 14:33   ` Chengming Zhou [this message]
2024-01-26 18:01 ` Nhat Pham
2024-01-27 14:37   ` 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=76b9e52a-9b51-4e4d-93ca-24a5aa3c4dca@linux.dev \
    --to=chengming.zhou@linux.dev \
    --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 \
    --cc=zhouchengming@bytedance.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.