On Thu, Jan 18, 2024 at 10:01 AM Nhat Pham <nphamcs@xxxxxxxxx> wrote: > > On Wed, Jan 17, 2024 at 7:06 PM Chris Li <chrisl@xxxxxxxxxx> wrote: > > > > The RB tree shows some contribution to the swap fault > > long tail latency due to two factors: > > 1) RB tree requires re-balance from time to time. > > 2) The zswap RB tree has a tree level spin lock protecting > > the tree access. > > > > The swap cache is using xarray. The break down the swap > > cache access does not have the similar long time as zswap > > RB tree. > > > > Moving the zswap entry to xarray enable read side > > take read RCU lock only. > > > > The first patch adds the xarray alongside the RB tree. > > There is some debug check asserting the xarray agrees with > > the RB tree results. > > > > The second patch removes the zwap RB tree. > > > > I expect to merge the zswap rb tree spin lock with the xarray > > lock in the follow up changes. > > > > I can surely use some help in reviewing and testing. > > > > Signed-off-by: Chris Li <chrisl@xxxxxxxxxx> > > --- > > Chris Li (2): > > mm: zswap.c: add xarray tree to zswap > > While I think it is pretty neat to keep the rbtree around to check if > the results agree during development stages, in the final version > please squash the patches. One patch is enough :) Ack. Chris