-
Notifications
You must be signed in to change notification settings - Fork 4
I211 priority scheduling for signal handler #212
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: master
Are you sure you want to change the base?
Conversation
kubanrob
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested with IHK. Maybe @rottaran has an opinion on the API/interface of ISchedulable and the EC. Looks fine otherwise.
|
|
||
| virtual void saveState() = 0; | ||
|
|
||
| virtual bool hasPriority() { return false; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe at least the interface should be able to hande different priorities?
We could define some integer constants like HIGH_PRIORITY, DEFAULT_PRIORITY and have defined behaviour only for these. I imagine we want to have LOW_PRIORITY somewhen in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added comment.
integer constants sound good, but I don't think it is necessary.
| struct SetPriority : public InvocationBase { | ||
| constexpr static uint16_t label = (proto<<8) + SET_PRIORITY; | ||
| SetPriority(bool priority) | ||
| : InvocationBase(label,getLength(this)), priority(priority) {} | ||
| bool priority; | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if we should limit that to a bool. See comment on interface. setPriority(false) could be hard to interpret.
| // or if if current ec got ready in case of race condition | ||
| if (current == nullptr || current == ec) home->preempt(); | ||
| // wake up the hardware thread if it has no execution context running | ||
| // or if if current ec got ready in case of race condition |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If a running EC priority has been set to default from another hw thread (-> without interrupting it), this should also be enough to prevent the EC from running if there is another high priority EC waiting to run.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, but I don't want to handle this special case.
#211
tested on qemu