-
Notifications
You must be signed in to change notification settings - Fork 7
RFC-20: Runtime Domain Schedules #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Initial draft implementation can be found at seL4/seL4#1511. But please keep design discussions here. That implementation differs in details from the RFC because I didn't had the draft RFC in front of me while writing the code.
|
|
If we are standardising on ticks, making duration always |
If it was up to me, I would combine domain and duration in 64 bits, e.g. 16 bits domain and 48 bits for ticks. Anyway, a downside of making it more than 32-bits is that retrieving the argument becomes harder, as it needs two registers on 32-bit platforms and only one on 64-bit. So no matter what we do, it will result in some ugliness somewhere. (Need something similar to |
Co-authored-by: Rafal Kolanski <rafal.kolanski.proofcraft.systems> Co-authored-by: Indan Zupancic <indan@nul.nu> Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
173b662 to
70afb70
Compare
Forcing the marker to be (0,0) is a guard against programming errors and misunderstanding the API. It does not really matter much either way, and guarding against programming errors is not really a design goal of seL4, but it would be available for no real cost here.
I have to confess that I only put that in because that check is everywhere else in MCS. I was thinking that having a domain time < MIN_BUDGET would make no thread schedulable in that domain, which would be a situation we'd want to avoid. I might be wrong about that. Happy to remove it. The check itself only affects the decode function, so it is very cheap to have if we do want it.
I don't think having time as sometimes 32 bit and sometimes 64 bit in MCS is a good idea. For MCS, the kernel has a standardised This would only affect MCS -- the domain schedule is in kernel ticks for master, which are fine to be word_t, because kernel ticks are much longer than timer ticks.
The naming scheme comes from the |
|
My summary of the discussion so far would be that we have not fully converged yet on the minor encoding details above, but nobody has voiced any objections to the overall design. |
|
I've implemented the 64-bit only version and I must admit that looks very clean, it only adds conditional padding to My main objection is that it wastes a lot of memory, but that can be solved in the future by manually packing the 8-bit domain with a 56-bit length into one 64-bit value, if we really want to fix it. I'm not keen on making it Checking for |
This RFC proposes to add the ability to set, maintain, and switch between domain schedules at runtime, authorised by the existing DomainCap, retaining the current information flow proof and behaviour when the DomainCap no longer exists in the system or is not used.
Rendered version