fix: treat CP HiCache metadata as backup state
This commit is contained in:
@@ -1006,7 +1006,7 @@ class HiRadixCache(RadixCache):
|
||||
|
||||
if self._is_pinned(x):
|
||||
# Still active: demote to host if possible
|
||||
if x.backuped:
|
||||
if self._node_backuped(x):
|
||||
num_evicted += self._evict_backuped(x)
|
||||
continue
|
||||
written = self.write_backup(x, write_back=True)
|
||||
@@ -1024,7 +1024,7 @@ class HiRadixCache(RadixCache):
|
||||
# Expired pin: clear and fall through to normal eviction
|
||||
self._clear_pin(x)
|
||||
|
||||
if not x.backuped:
|
||||
if not self._node_backuped(x):
|
||||
if self.cache_controller.write_policy == "write_back":
|
||||
# write to host if the node is not backuped
|
||||
num_evicted += self.write_backup(x, write_back=True)
|
||||
@@ -1047,7 +1047,7 @@ class HiRadixCache(RadixCache):
|
||||
if self.cache_controller.write_policy == "write_back":
|
||||
self.writing_check(write_back=True)
|
||||
for node in write_back_nodes:
|
||||
assert node.backuped
|
||||
assert self._node_backuped(node)
|
||||
self._evict_backuped(node)
|
||||
|
||||
self.update_eviction_metrics(num_evicted, start_time)
|
||||
|
||||
Reference in New Issue
Block a user