From: Johannes Weiner <hannes@cmpxchg.org>
To: Chengming Zhou <chengming.zhou@linux.dev>
Cc: akpm@linux-foundation.org, yosryahmed@google.com,
nphamcs@gmail.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org,
kernel test robot <oliver.sang@intel.com>
Subject: Re: [PATCH mm-unstable] mm/zswap: global lru and shrinker shared by all zswap_pools fix
Date: Tue, 5 Mar 2024 10:09:23 -0500 [thread overview]
Message-ID: <20240305150923.GB1491027@cmpxchg.org> (raw)
In-Reply-To: <20240305075345.1493214-1-chengming.zhou@linux.dev>
On Tue, Mar 05, 2024 at 07:53:45AM +0000, Chengming Zhou wrote:
> The commit bf9b7df23cb3 ("mm/zswap: global lru and shrinker shared by
> all zswap_pools") introduced a new lock to protect zswap_next_shrink,
> instead of reusing zswap_pools_lock.
>
> But the problem is that it's initialized only when zswap enabled,
> which causes bug if zswap_memcg_offline_cleanup() called without
> zswap enabled.
>
> Fix it by using DEFINE_SPINLOCK() to statically initialize them
> and define them as multiple static variables to keep in consistent
> with the existing global variables in zswap.
>
> Fixes: bf9b7df23cb3 ("mm/zswap: global lru and shrinker shared by all zswap_pools")
> Reported-by: kernel test robot <oliver.sang@intel.com>
> Closes: https://lore.kernel.org/oe-lkp/202403051008.a8cf8a94-lkp@intel.com
> Signed-off-by: Chengming Zhou <chengming.zhou@linux.dev>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
next prev parent reply other threads:[~2024-03-05 15:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-16 8:55 [PATCH v3 0/2] mm/zswap: optimize for dynamic zswap_pools Chengming Zhou
2024-02-16 8:55 ` [PATCH v3 1/2] mm/zswap: global lru and shrinker shared by all zswap_pools Chengming Zhou
2024-02-20 1:28 ` Nhat Pham
2024-02-20 3:24 ` Chengming Zhou
2024-03-05 7:53 ` [PATCH mm-unstable] mm/zswap: global lru and shrinker shared by all zswap_pools fix Chengming Zhou
2024-03-05 15:09 ` Johannes Weiner [this message]
2024-02-16 8:55 ` [PATCH v3 2/2] mm/zswap: change zswap_pool kref to percpu_ref Chengming Zhou
2024-02-16 10:41 ` Nhat Pham
2024-02-28 15:18 ` [PATCH mm-unstable hotfix] mm/zswap: fix zswap_pools_lock usages after changing " Chengming Zhou
2024-02-28 15:24 ` Matthew Wilcox
2024-02-28 15:37 ` Chengming Zhou
2024-02-28 15:49 ` [PATCH mm-unstable v2] " 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=20240305150923.GB1491027@cmpxchg.org \
--to=hannes@cmpxchg.org \
--cc=akpm@linux-foundation.org \
--cc=chengming.zhou@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nphamcs@gmail.com \
--cc=oliver.sang@intel.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