[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJD7tkber7UL7F-ZghNvVig=7zoAB9cPMjaQpWm8c6Y9OrmBFQ@mail.gmail.com>
Date: Thu, 28 Dec 2023 07:19:08 -0800
From: Yosry Ahmed <yosryahmed@...gle.com>
To: Chengming Zhou <zhouchengming@...edance.com>
Cc: Barry Song <21cnbao@...il.com>, Nhat Pham <nphamcs@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>, Dan Streetman <ddstreet@...e.org>,
Vitaly Wool <vitaly.wool@...sulko.com>, Johannes Weiner <hannes@...xchg.org>,
Chris Li <chriscli@...gle.com>, Seth Jennings <sjenning@...hat.com>, Chris Li <chrisl@...nel.org>,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 5/5] mm/zswap: change per-cpu mutex and buffer to per-acomp_ctx
On Thu, Dec 28, 2023 at 1:46 AM Chengming Zhou
<zhouchengming@...edance.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@...nel.org> (Google)
> Reviewed-by: Nhat Pham <nphamcs@...il.com>
> Signed-off-by: Chengming Zhou <zhouchengming@...edance.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.
Powered by blists - more mailing lists