RE: [PATCH v2] zswap: replace RB tree with xarray

From: David Laight
Date: Fri Mar 01 2024 - 16:58:57 EST


From: Chris Li
> Sent: 29 February 2024 08:46
>
> Very deep RB tree requires rebalance at times. That
> contributes to the zswap fault latencies. Xarray does not
> need to perform tree rebalance. Replacing RB tree to xarray
> can have some small performance gain.
>
> One small difference is that xarray insert might fail with
> ENOMEM, while RB tree insert does not allocate additional
> memory.

What is the difference in kernel memory use?
IIRC someone pointed out (in the rosebush thread) that xarray
uses a lot of kernel memory if the items are randomly distributed.

David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)