[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANeU7Qmr-cirRJxm7JyfoFH+d782tHCvuC6wtEBzF4bpd5aeyg@mail.gmail.com>
Date: Tue, 26 Mar 2024 14:20:58 -0700
From: Chris Li <chrisl@...nel.org>
To: Nhat Pham <nphamcs@...il.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, Yosry Ahmed <yosryahmed@...gle.com>,
Johannes Weiner <hannes@...xchg.org>, "Matthew Wilcox (Oracle)" <willy@...radead.org>,
Chengming Zhou <zhouchengming@...edance.com>, Barry Song <v-songbaohua@...o.com>
Subject: Re: [PATCH v9] zswap: replace RB tree with xarray
Hi Yosry, Johannes and Nhat,
Thank you for your review. I have sent out V10 to revert the comment.
Chris
On Tue, Mar 26, 2024 at 2:04 PM Nhat Pham <nphamcs@...il.com> wrote:
>
> On Tue, Mar 26, 2024 at 11:42 AM Chris Li <chrisl@...nel.org> wrote:
> >
> > > - * When reading into the swapcache, invalidate our entry. The
> > > + * When reading into the swapcache, erase our entry. The
> > > * swapcache can be the authoritative owner of the page and
> > > * its mappings, and the pressure that results from having two
> > > * in-memory copies outweighs any benefits of caching the
> > > @@ -1649,8 +1581,12 @@ bool zswap_load(struct folio *folio)
> > > * the fault fails. We remain the primary owner of the entry.)
> > > */
> > > if (swapcache)
> > > - zswap_rb_erase(&tree->rbroot, entry);
> > > - spin_unlock(&tree->lock);
> > > + entry = xa_erase(tree, offset);
> > > + else
> > > + entry = xa_load(tree, offset);
> >
> > This is the place I make the modification for the conflict resolution.
> > It depends on the swapcache to execute xa_erase() or xa_load().
> > Obviously, the xa_load() will not delete the entry from the tree.
> >
>
> The conflict resolution itself LGTM. I'll let you and Johannes decide
> on the comment (but FWIW, the original meaning still holds, so I don't
> see why we need to fix it).
>
> Reviewed-by: Nhat Pham <nphamcs@...il.com>
>
Powered by blists - more mailing lists