> -----Original Message----- > From: Nhat Pham <nphamcs@xxxxxxxxx> > Sent: Saturday, September 28, 2024 4:27 PM > To: Sridhar, Kanchana P <kanchana.p.sridhar@xxxxxxxxx> > Cc: linux-kernel@xxxxxxxxxxxxxxx; linux-mm@xxxxxxxxx; > hannes@xxxxxxxxxxx; yosryahmed@xxxxxxxxxx; > chengming.zhou@xxxxxxxxx; usamaarif642@xxxxxxxxx; > shakeel.butt@xxxxxxxxx; ryan.roberts@xxxxxxx; Huang, Ying > <ying.huang@xxxxxxxxx>; 21cnbao@xxxxxxxxx; akpm@xxxxxxxxxxxxxxxxxxxx; > Zou, Nanhai <nanhai.zou@xxxxxxxxx>; Feghali, Wajdi K > <wajdi.k.feghali@xxxxxxxxx>; Gopal, Vinodh <vinodh.gopal@xxxxxxxxx> > Subject: Re: [PATCH v8 3/8] mm: zswap: Rename zswap_pool_get() to > zswap_pool_tryget(). > > On Fri, Sep 27, 2024 at 7:16 PM Kanchana P Sridhar > <kanchana.p.sridhar@xxxxxxxxx> wrote: > > > > Modify the name of the existing zswap_pool_get() to zswap_pool_tryget() > > to be representative of the call it makes to percpu_ref_tryget(). > > A subsequent patch will introduce a new zswap_pool_get() that calls > > percpu_ref_get(). > > > > The intent behind this change is for higher level zswap API such as > > zswap_store() to call zswap_pool_tryget() to check upfront if the pool's > > refcount is "0" (which means it could be getting destroyed) and to handle > > this as an error condition. zswap_store() would proceed only if > > zswap_pool_tryget() returns success, and any additional pool refcounts that > > need to be obtained for compressing sub-pages in a large folio could simply > > call zswap_pool_get(). > > > > Signed-off-by: Kanchana P Sridhar <kanchana.p.sridhar@xxxxxxxxx> > > Reviewed-by: Nhat Pham <nphamcs@xxxxxxxxx> Thanks Nhat! Thanks, Kanchana