reverie-rs / reverie

trace and intercept linux syscalls.
Other
14 stars 5 forks source link

RFC: abstract taskState and globalState #5

Open wangbj opened 5 years ago

wangbj commented 5 years ago

As discussed before, there're per-task state (state.hpp) as well as global state (globalState.hpp), most of them, however, exist because of stat* families, if we no longer need them because of detfs, 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 implement Serialize instance.

Here's a brief review:

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 the statistics.

gatoWololo commented 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?