Skip to content

Commit

Permalink
fix quiesce
Browse files Browse the repository at this point in the history
  • Loading branch information
Firstyear committed Feb 19, 2022
1 parent 4c13798 commit 7ab8282
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/arcache/mod.rs
Expand Up @@ -926,11 +926,13 @@ impl<
/// If the lock is available, attempt to quiesce the cache's async channel states. If the lock
/// is currently held, no action is taken.
pub fn try_quiesce(&self) {
if self.above_watermark.load(Ordering::Relaxed) {
if let Some(wr_txn) = self.try_write() {
wr_txn.commit()
};
}
// It seems like a good idea to skip this when not at wmark, but
// that can cause low-pressure caches to no submit includes properly.
// if self.above_watermark.load(Ordering::Relaxed) {
if let Some(wr_txn) = self.try_write() {
wr_txn.commit()
};
// }
}

fn calc_p_freq(ghost_rec_len: usize, ghost_freq_len: usize, p: &mut usize) {
Expand Down

0 comments on commit 7ab8282

Please sign in to comment.