lkml.org 
[lkml]   [2013]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRE: [PATCHv6 0/8] zswap: compressed swap caching
> From: Seth Jennings [mailto:sjenning@linux.vnet.ibm.com]
> Subject: [PATCHv6 0/8] zswap: compressed swap caching
>
> Changelog:
>
> v6:
> * fix improper freeing of rbtree (Cody)

Cody's bug fix reminded me of a rather fundamental question:

Why does zswap use a rbtree instead of a radix tree?

Intuitively, I'd expect that pgoff_t values would
have a relatively high level of locality AND at any one time
the set of stored pgoff_t values would be relatively non-sparse.
This would argue that a radix tree would result in fewer nodes
touched on average for lookup/insert/remove.

Do you have evidence that rbtree is better here?
(Preferably over a set of workloads larger than
kernbench and SPECjbb ;-) Or are there other
important design issues that disqualify a radix tree?

In the end, I guess either one (rbtree or radix tree)
will work, but it would be nice to get this kind of
fundamental design issue properly solved before merging
is to be considered.

Dan


\
 
 \ /
  Last update: 2013-02-21 18:21    [W:0.443 / U:0.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site