I will add the Mithril algorithm that was mentioned in the previous issue.
Since Mithril is intended to enhance a cache for block storage or on-chip storage, there is a confusing problem in the original algorithm (block_size and all objects are of equal size), which conflicts with most algorithms that support variable object sizes in this project.
So I have done these changes.
The block_size is 1 in the default setting, otherwise, set block_size in eviction_params such as -e "block-size=65536".
For variable size, I set a hash_table cache_size_map that maps all requested objects to their size in order to set req->obj_size in prefetching. There seems to be a better approach here, like keeping track of object sizes in recording_table, mining_table and prefetch_table.
Oh, Mithril supports the second-chance mechanism, so the base cache should provide {base_cache}_to_evict interface.
Based on the above, I will submit a pull request. 😀
I will add the
Mithril
algorithm that was mentioned in the previous issue.Since Mithril is intended to enhance a cache for block storage or on-chip storage, there is a confusing problem in the original algorithm (
block_size
and all objects are of equal size), which conflicts with most algorithms that support variable object sizes in this project.So I have done these changes.
block_size
is 1 in the default setting, otherwise, setblock_size
in eviction_params such as-e "block-size=65536"
.cache_size_map
that maps all requested objects to their size in order to setreq->obj_size
in prefetching. There seems to be a better approach here, like keeping track of object sizes inrecording_table
,mining_table
andprefetch_table
.{base_cache}_to_evict
interface.Based on the above, I will submit a pull request. 😀