From: Nhat Pham <nphamcs@gmail.com>
To: SeongJae Park <sj@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Chengming Zhou <chengming.zhou@linux.dev>,
Johannes Weiner <hannes@cmpxchg.org>,
Yosry Ahmed <yosry.ahmed@linux.dev>,
kernel-team@meta.com, linux-kernel@vger.kernel.org,
linux-mm@kvack.org
Subject: Re: [PATCH 1/4] mm/zswap: remove unnecessary dlen writes for incompressible pages
Date: Wed, 8 Oct 2025 08:45:51 -0700 [thread overview]
Message-ID: <CAKEwX=NOr96gbdEDJR8aTkwPfYzObEBq6W3Ow4-e8Q5k=v__MA@mail.gmail.com> (raw)
In-Reply-To: <20251003203851.43128-2-sj@kernel.org>
On Fri, Oct 3, 2025 at 1:38 PM SeongJae Park <sj@kernel.org> wrote:
>
> Incompressible pages handling logic in zswap_compress() is setting
> 'dlen' as PAGE_SIZE twice. Once before deciding whether to save the
> content as is, and once again after it is decided to save it as is.
> But the value of 'dlen' is used only if it is decided to save the
> content as is, so the first write is unnecessary. It is not causing
> real user issues, but making code confusing to read. Remove the
> unnecessary write operation.
>
> Signed-off-by: SeongJae Park <sj@kernel.org>
Acked-by: Nhat Pham <nphamcs@gmail.com>
next prev parent reply other threads:[~2025-10-08 15:46 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-03 20:38 [PATCH 0/4] mm/zswap: misc cleanup of code and documentations SeongJae Park
2025-10-03 20:38 ` [PATCH 1/4] mm/zswap: remove unnecessary dlen writes for incompressible pages SeongJae Park
2025-10-07 23:40 ` Yosry Ahmed
2025-10-08 15:45 ` Nhat Pham [this message]
2025-10-09 3:02 ` Chengming Zhou
2025-10-03 20:38 ` [PATCH 2/4] mm/zswap: fix typos: s/zwap/zswap/ SeongJae Park
2025-10-07 23:40 ` Yosry Ahmed
2025-10-08 15:46 ` Nhat Pham
2025-10-09 3:02 ` Chengming Zhou
2025-10-03 20:38 ` [PATCH 3/4] mm/zswap: s/red-black tree/xarray/ SeongJae Park
2025-10-07 23:41 ` Yosry Ahmed
2025-10-08 15:46 ` Nhat Pham
2025-10-09 3:03 ` Chengming Zhou
2025-10-03 20:38 ` [PATCH 4/4] Docs/admin-guide/mm/zswap: " SeongJae Park
2025-10-07 23:42 ` Yosry Ahmed
2025-10-08 15:48 ` Nhat Pham
2025-10-09 3:03 ` 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='CAKEwX=NOr96gbdEDJR8aTkwPfYzObEBq6W3Ow4-e8Q5k=v__MA@mail.gmail.com' \
--to=nphamcs@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=chengming.zhou@linux.dev \
--cc=hannes@cmpxchg.org \
--cc=kernel-team@meta.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=sj@kernel.org \
--cc=yosry.ahmed@linux.dev \
/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