From: Yosry Ahmed <yosryahmed@google.com>
To: Chengming Zhou <zhouchengming@bytedance.com>
Cc: Barry Song <21cnbao@gmail.com>, Nhat Pham <nphamcs@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
Dan Streetman <ddstreet@ieee.org>,
Vitaly Wool <vitaly.wool@konsulko.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Chris Li <chriscli@google.com>,
Seth Jennings <sjenning@redhat.com>, Chris Li <chrisl@kernel.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 5/5] mm/zswap: change per-cpu mutex and buffer to per-acomp_ctx
Date: Thu, 28 Dec 2023 07:19:08 -0800 [thread overview]
Message-ID: <CAJD7tkber7UL7F-ZghNvVig=7zoAB9cPMjaQpWm8c6Y9OrmBFQ@mail.gmail.com> (raw)
In-Reply-To: <20231213-zswap-dstmem-v5-5-9382162bbf05@bytedance.com>
On Thu, Dec 28, 2023 at 1:46 AM Chengming Zhou
<zhouchengming@bytedance.com> wrote:
>
> First of all, we need to rename acomp_ctx->dstmem field to buffer,
> since we are now using for purposes other than compression.
>
> Then we change per-cpu mutex and buffer to per-acomp_ctx, since
> them belong to the acomp_ctx and are necessary parts when used
> in the compress/decompress contexts.
>
> So we can remove the old per-cpu mutex and dstmem.
>
> Acked-by: Chris Li <chrisl@kernel.org> (Google)
> Reviewed-by: Nhat Pham <nphamcs@gmail.com>
> Signed-off-by: Chengming Zhou <zhouchengming@bytedance.com>
Instead of hardcoding PAGE_SIZE * 2 multiple times, can we define a
constant for this and document the need for the buffer size there?
Even better if that constant is based on WORST_COMPR_FACTOR and shared
between zswap and zram -- but this can be a follow up change.
prev parent reply other threads:[~2023-12-28 15:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-28 9:45 [PATCH v5 0/5] mm/zswap: dstmem reuse optimizations and cleanups Chengming Zhou
2023-12-28 9:45 ` [PATCH v5 1/5] mm/zswap: reuse dstmem when decompress Chengming Zhou
2023-12-28 9:45 ` [PATCH v5 2/5] mm/zswap: refactor out __zswap_load() Chengming Zhou
2023-12-28 9:45 ` [PATCH v5 3/5] mm/zswap: cleanup zswap_load() Chengming Zhou
2023-12-28 9:45 ` [PATCH v5 4/5] mm/zswap: cleanup zswap_writeback_entry() Chengming Zhou
2023-12-28 9:45 ` [PATCH v5 5/5] mm/zswap: change per-cpu mutex and buffer to per-acomp_ctx Chengming Zhou
2023-12-28 15:19 ` Yosry Ahmed [this message]
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='CAJD7tkber7UL7F-ZghNvVig=7zoAB9cPMjaQpWm8c6Y9OrmBFQ@mail.gmail.com' \
--to=yosryahmed@google.com \
--cc=21cnbao@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=chriscli@google.com \
--cc=chrisl@kernel.org \
--cc=ddstreet@ieee.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nphamcs@gmail.com \
--cc=sjenning@redhat.com \
--cc=vitaly.wool@konsulko.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox