linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Chengming Zhou <zhouchengming@bytedance.com>
To: Johannes Weiner <hannes@cmpxchg.org>,
	Yosry Ahmed <yosryahmed@google.com>,
	Nhat Pham <nphamcs@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Chris Li <chriscli@google.com>
Cc: Chengming Zhou <zhouchengming@bytedance.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Nhat Pham <nphamcs@gmail.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: [PATCH v2 0/3] mm/zswap: fix race between lru writeback and swapoff
Date: Sun, 28 Jan 2024 13:28:48 +0000	[thread overview]
Message-ID: <20240126-zswap-writeback-race-v2-0-b10479847099@bytedance.com> (raw)

This is based on mm-unstable and the "mm: zswap: fix missing folio cleanup
in writeback race path" patch [1].

Changes in v2:
- Append a patch to remove list_lru_putback() since its only user
  in zswap has gone, per Nhat.
- Improve the commit messages per Johannes.
- Add comments about the lru rotate in shrink_memcg_cb() per Johannes.
- Collect tags.
- Link to v1: https://lore.kernel.org/all/20240126083015.3557006-1-chengming.zhou@linux.dev/

This series mainly fix the race problem between lru writeback and swapoff,
which is spotted by Yosry [2]. Please see the commits for details.

Thanks for review and comments!

[1] https://lore.kernel.org/all/20240125085127.1327013-1-yosryahmed@google.com/
[2] https://lore.kernel.org/all/CAJD7tkasHsRnT_75-TXsEe58V9_OW6m3g6CF7Kmsvz8CKRG_EA@mail.gmail.com/

Signed-off-by: Chengming Zhou <zhouchengming@bytedance.com>
---
Chengming Zhou (3):
      mm/zswap: don't return LRU_SKIP if we have dropped lru lock
      mm/zswap: fix race between lru writeback and swapoff
      mm/list_lru: remove list_lru_putback()

 include/linux/list_lru.h |  16 -------
 mm/list_lru.c            |  14 ------
 mm/zswap.c               | 120 ++++++++++++++++++++---------------------------
 3 files changed, 51 insertions(+), 99 deletions(-)
---
base-commit: 13d63cb513841433b69564b07614169e61113720
change-id: 20240126-zswap-writeback-race-2773be0a3ad4

Best regards,
-- 
Chengming Zhou <zhouchengming@bytedance.com>


             reply	other threads:[~2024-01-28 13:29 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-28 13:28 Chengming Zhou [this message]
2024-01-28 13:28 ` [PATCH v2 1/3] mm/zswap: don't return LRU_SKIP if we have dropped lru lock Chengming Zhou
2024-01-30  0:09   ` Yosry Ahmed
2024-01-30  0:12     ` Nhat Pham
2024-01-30  0:58       ` Yosry Ahmed
2024-01-28 13:28 ` [PATCH v2 2/3] mm/zswap: fix race between lru writeback and swapoff Chengming Zhou
2024-01-30  0:22   ` Yosry Ahmed
2024-01-30  2:30     ` Chengming Zhou
2024-01-30  3:17       ` Johannes Weiner
2024-01-30  3:31         ` Chengming Zhou
2024-01-28 13:28 ` [PATCH v2 3/3] mm/list_lru: remove list_lru_putback() Chengming Zhou
2024-01-28 15:52   ` Johannes Weiner
2024-01-28 19:45     ` Nhat Pham
2024-01-30  0:34   ` Yosry Ahmed

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=20240126-zswap-writeback-race-v2-0-b10479847099@bytedance.com \
    --to=zhouchengming@bytedance.com \
    --cc=akpm@linux-foundation.org \
    --cc=chriscli@google.com \
    --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