All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Weiner <hannes@cmpxchg.org>
To: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, Chengming Zhou <chengming.zhou@linux.dev>,
	Kairui Song <kasong@tencent.com>, Nhat Pham <nphamcs@gmail.com>,
	Yosry Ahmed <yosryahmed@google.com>
Subject: Re: [PATCH v2 2/4] mm: zswap: reuse zswap_invalidate() in zswap_store() check_old path
Date: Thu, 10 Sep 2026 15:27:56 -0400	[thread overview]
Message-ID: <aqMEvL-fQNGgau4y@cmpxchg.org> (raw)
In-Reply-To: <20260910095449.715183-3-wangkefeng.wang@huawei.com>

On Thu, Sep 10, 2026 at 05:54:47PM +0800, Kefeng Wang wrote:
> The check_old path in zswap_store() open-codes the same per-slot
> xarray lookup and entry free that zswap_invalidate() already does.
> Reuse zswap_invalidate() whose xa_empty() check skips empty per-area
> trees to avoid unnecessary xarray lookup and code duplication.
> 
> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>

Reviewed-by: Johannes Weiner <hannes@cmpxchg.org>


  parent reply	other threads:[~2026-09-10 19:28 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-10  9:54 [PATCH v2 0/4] mm: zswap: misc optimizations Kefeng Wang
2026-09-10  9:54 ` [PATCH v2 1/4] mm: zswap: pass type and offset to zswap_invalidate() directly Kefeng Wang
2026-09-10 10:26   ` Yosry Ahmed
2026-09-10 17:57   ` Nhat Pham
2026-09-10 19:27   ` Johannes Weiner
2026-09-10  9:54 ` [PATCH v2 2/4] mm: zswap: reuse zswap_invalidate() in zswap_store() check_old path Kefeng Wang
2026-09-10 10:27   ` Yosry Ahmed
2026-09-10 19:27   ` Johannes Weiner [this message]
2026-09-10  9:54 ` [PATCH v2 3/4] mm: zswap: avoid unnecessary xarray lookup in zswap_store() Kefeng Wang
2026-09-10 10:28   ` Yosry Ahmed
2026-09-10  9:54 ` [PATCH v2 4/4] mm: zswap: skip zswap_invalidate() in swap_range_free() when zswap is unused Kefeng Wang
2026-09-10 10:29   ` Yosry Ahmed
2026-09-10 11:10     ` Kefeng Wang
2026-09-10 11:12       ` 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=aqMEvL-fQNGgau4y@cmpxchg.org \
    --to=hannes@cmpxchg.org \
    --cc=akpm@linux-foundation.org \
    --cc=chengming.zhou@linux.dev \
    --cc=kasong@tencent.com \
    --cc=linux-mm@kvack.org \
    --cc=nphamcs@gmail.com \
    --cc=wangkefeng.wang@huawei.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 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.