Open wangbj opened 5 years ago
I agree, one of the motivations behind the detfs layer is to omit all these stat* functions we need to intercept. So a good chunk of global state will be gone, as you stated, at some point we will probably need some global state.
I agree with what you have here. One thing to note is once we move to logical clocks, that will probably be more global state to share with the central coordinator?
As discussed before, there're per-task state (
state.hpp
) as well as global state (globalState.hpp
), most of them, however, exist because ofstat*
families, if we no longer need them because ofdetfs
, them most of the states can be eliminated.Because we might end up with sharing pages for per-task state / global state, the
states
should implementSerialize
instance.Here's a brief review:
statistics
, and global time;logger
(per-task instead of global), signal handlers;Since we already have injected
mmap
pages, we can desinate several pages for per-task states, and they should be private (non-sharable pages); The global states doesn't have much crucial data except for global time, and we might not need a shared global page after all, instead, we can have few APIs to retrieve global time, and/or update thestatistics
.