Explorar o código

Make sure the raft state occupies entire L3 cache.

Jing Yang %!s(int64=3) %!d(string=hai) anos
pai
achega
17a7dfa1d2
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  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>,