Re: [PATCH v2 5/6] mm: zswap: store incompressible page as-is

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2024/7/13 06:47, Nhat Pham wrote:
On Tue, Jul 9, 2024 at 6:26 AM Chengming Zhou <chengming.zhou@xxxxxxxxx> wrote:

On 2024/7/8 21:44, Takero Funaki wrote:
2024年7月8日(月) 12:56 Chengming Zhou <chengming.zhou@xxxxxxxxx>:

        comp_ret = crypto_wait_req(crypto_acomp_compress(acomp_ctx->req), &acomp_ctx->wait);
        dlen = acomp_ctx->req->dlen;
-     if (comp_ret)
+
+     /* coa_compress returns -EINVAL for errors including insufficient dlen */
+     if (comp_ret && comp_ret != -EINVAL)
                goto unlock;

Seems we don't need to care about? "comp_ret" is useless anymore.

Just:

if (comp_ret || dlen > PAGE_SIZE - 64)
          dlen = PAGE_SIZE;

And remove the checkings of comp_ret at the end.



We actually don't need to hold mutex if we are just copying folio.

Thanks.


Thanks for reviewing.

For comp_ret, can we consolidate all possible error codes as
incompressible data?

Maybe we still want these debug counters? I'm not sure.

I'm a bit torn, but ATM I have no strong opinions on these two error
codes. If you do decide to consolidate these two, may I ask you to
separate it into its own patch so that we can review + discuss it
separately?

Yeah, I also have no strong opinions on these two error codes,
it's just ok to keep them.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux