Преглед изворни кода

Make sure the raft state occupies entire L3 cache.

Jing Yang пре 3 година
родитељ
комит
17a7dfa1d2
1 измењених фајлова са 1 додато и 0 уклоњено
  1. 1 0
      src/raft_state.rs

+ 1 - 0
src/raft_state.rs

@@ -10,6 +10,7 @@ pub(crate) enum State {
     Leader,
 }
 
+#[repr(align(64))]
 pub(crate) struct RaftState<Command> {
     pub current_term: Term,
     pub voted_for: Option<Peer>,