[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <SJ2PR11MB8472432D6D0E813182E80F97C99CA@SJ2PR11MB8472.namprd11.prod.outlook.com>
Date: Sat, 31 Jan 2026 01:15:13 +0000
From: "Sridhar, Kanchana P" <kanchana.p.sridhar@...el.com>
To: Nhat Pham <nphamcs@...il.com>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>, "hannes@...xchg.org"
<hannes@...xchg.org>, "yosry.ahmed@...ux.dev" <yosry.ahmed@...ux.dev>,
"chengming.zhou@...ux.dev" <chengming.zhou@...ux.dev>,
"usamaarif642@...il.com" <usamaarif642@...il.com>, "ryan.roberts@....com"
<ryan.roberts@....com>, "21cnbao@...il.com" <21cnbao@...il.com>,
"ying.huang@...ux.alibaba.com" <ying.huang@...ux.alibaba.com>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"senozhatsky@...omium.org" <senozhatsky@...omium.org>, "sj@...nel.org"
<sj@...nel.org>, "kasong@...cent.com" <kasong@...cent.com>,
"linux-crypto@...r.kernel.org" <linux-crypto@...r.kernel.org>,
"herbert@...dor.apana.org.au" <herbert@...dor.apana.org.au>,
"davem@...emloft.net" <davem@...emloft.net>, "clabbe@...libre.com"
<clabbe@...libre.com>, "ardb@...nel.org" <ardb@...nel.org>,
"ebiggers@...gle.com" <ebiggers@...gle.com>, "surenb@...gle.com"
<surenb@...gle.com>, "Accardi, Kristen C" <kristen.c.accardi@...el.com>,
"Gomes, Vinicius" <vinicius.gomes@...el.com>, "Cabiddu, Giovanni"
<giovanni.cabiddu@...el.com>, "Feghali, Wajdi K" <wajdi.k.feghali@...el.com>,
"Sridhar, Kanchana P" <kanchana.p.sridhar@...el.com>
Subject: RE: [PATCH v14 24/26] mm: zswap: Consistently use IS_ERR_OR_NULL() to
check acomp_ctx resources.
> -----Original Message-----
> From: Nhat Pham <nphamcs@...il.com>
> Sent: Friday, January 30, 2026 3:53 PM
> To: Sridhar, Kanchana P <kanchana.p.sridhar@...el.com>
> Cc: linux-kernel@...r.kernel.org; linux-mm@...ck.org;
> hannes@...xchg.org; yosry.ahmed@...ux.dev; chengming.zhou@...ux.dev;
> usamaarif642@...il.com; ryan.roberts@....com; 21cnbao@...il.com;
> ying.huang@...ux.alibaba.com; akpm@...ux-foundation.org;
> senozhatsky@...omium.org; sj@...nel.org; kasong@...cent.com; linux-
> crypto@...r.kernel.org; herbert@...dor.apana.org.au;
> davem@...emloft.net; clabbe@...libre.com; ardb@...nel.org;
> ebiggers@...gle.com; surenb@...gle.com; Accardi, Kristen C
> <kristen.c.accardi@...el.com>; Gomes, Vinicius <vinicius.gomes@...el.com>;
> Cabiddu, Giovanni <giovanni.cabiddu@...el.com>; Feghali, Wajdi K
> <wajdi.k.feghali@...el.com>
> Subject: Re: [PATCH v14 24/26] mm: zswap: Consistently use
> IS_ERR_OR_NULL() to check acomp_ctx resources.
>
> On Sat, Jan 24, 2026 at 7:36 PM Kanchana P Sridhar
> <kanchana.p.sridhar@...el.com> wrote:
> >
> > Use IS_ERR_OR_NULL() in zswap_cpu_comp_prepare() to check for valid
> > acomp/req, making it consistent with acomp_ctx_dealloc().
> >
> > Signed-off-by: Kanchana P Sridhar <kanchana.p.sridhar@...el.com>
> > Acked-by: Yosry Ahmed <yosry.ahmed@...ux.dev>
>
> LGTM. I wonder if this is technically a fix?
Hi Nhat,
Thanks for the review comments and for the Ack!
As to whether this is technically a fix: I think the answer is "not really",
because:
1) The failure handling has been consolidated to acomp_ctx_dealloc().
2) acomp_ctx_dealloc() replaces the existing zswap_cpu_comp_dead(),
which uses the same checks with IS_ERR_OR_NULL() for the
acomp_ctx->acomp and acomp_ctx->req.
3) Hence, this patch brings the error condition checks for these two
acomp_ctx members' allocation to be consistent with (1) and (2).
So I suppose this is a consistency change rather than a fix. Please
correct me if I am wrong.
>
> Also, considering submitting this separately if the patch series stall
> - so that you don't have to carry one extra patch around every time :)
Sure, thanks for the suggestion.
I would appreciate it if yourself and Yosry can review the other zswap
related patches in this series. I have addressed all but one v13 comment,
as mentioned in the cover letter in the "v14 Performance Summary"
section.
>
> Anyway:
> Acked-by: Nhat Pham <nphamcs@...il.com>
Thanks!
Kanchana
Powered by blists - more mailing lists