sched/hmp: Automatically add children threads to colocation group
When sched_enable_thread_grouping is turned on, the scheduler needs
to ensure that any pre-existing children of a task get added to the
co-location group. Upon removal from the co-location group, however,
the scheduler does not check for the thread grouping flag because
userspace cannot ensure correct behavior. Therefore as a
precautionary measure to avoid memory leaks the scheduler has to
forcefully remove children from the group regardless of the flag
setting.
While at it, also make group management a lot simpler. Without these
simplifications, we can end up in extremely complicated locking scenarios
where ensuring the correct order to avoid deadlocks is near impossible.
Change-Id: I4c13601b0fded6de9d8f897c6d471c6a40c90e4d
Signed-off-by:
Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
Loading
Please register or sign in to comment