mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
add the evicted record and remove a debug line i forgot to trim
This commit is contained in:
parent
e500588360
commit
004599543a
2 changed files with 5 additions and 3 deletions
|
|
@ -555,9 +555,7 @@ impl DictCacheEntry {
|
||||||
let pool_index = small_storage_index_from_key(&kcache, self.index).expect("pool should be valid");
|
let pool_index = small_storage_index_from_key(&kcache, self.index).expect("pool should be valid");
|
||||||
let ksp = &mut self.small_pool[pool_index];
|
let ksp = &mut self.small_pool[pool_index];
|
||||||
if !ksp.contents.contains(&name.to_string()) {
|
if !ksp.contents.contains(&name.to_string()) {
|
||||||
log::warn!("illegal state: key_update fill key pool contents: {:?}", ksp.contents);
|
log::warn!("illegal state: key_update fill key pool contents: {:?}, missing {}", ksp.contents, name);
|
||||||
let tt = ticktimer_server::Ticktimer::new().unwrap();
|
|
||||||
tt.sleep_ms(1000).ok();
|
|
||||||
panic!("Entry to fill isn't in the expected pool");
|
panic!("Entry to fill isn't in the expected pool");
|
||||||
}
|
}
|
||||||
let data_vaddr = small_storage_base_vaddr_from_indices(self.index, pool_index);
|
let data_vaddr = small_storage_base_vaddr_from_indices(self.index, pool_index);
|
||||||
|
|
|
||||||
|
|
@ -181,7 +181,10 @@ pub(crate) struct KeySmallPool {
|
||||||
pub(crate) contents: Vec::<String>,
|
pub(crate) contents: Vec::<String>,
|
||||||
/// keeps track of the available space within the pool, avoiding an expensive lookup every time we want to query the available space
|
/// keeps track of the available space within the pool, avoiding an expensive lookup every time we want to query the available space
|
||||||
pub(crate) avail: u16,
|
pub(crate) avail: u16,
|
||||||
|
/// if false, contents are modified and need syncing to disk
|
||||||
pub(crate) clean: bool,
|
pub(crate) clean: bool,
|
||||||
|
/// if true, some elements of this pool were evicted to make room in RAM
|
||||||
|
pub(crate) evicted: bool,
|
||||||
}
|
}
|
||||||
impl KeySmallPool {
|
impl KeySmallPool {
|
||||||
pub(crate) fn new() -> KeySmallPool {
|
pub(crate) fn new() -> KeySmallPool {
|
||||||
|
|
@ -189,6 +192,7 @@ impl KeySmallPool {
|
||||||
contents: Vec::<String>::new(),
|
contents: Vec::<String>::new(),
|
||||||
avail: SMALL_CAPACITY as u16,
|
avail: SMALL_CAPACITY as u16,
|
||||||
clean: false,
|
clean: false,
|
||||||
|
evicted: false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue