Skip to content

Conversation

@arighi
Copy link
Contributor

@arighi arighi commented Jan 2, 2024

Instead of implementing a garbage collector to periodically free up exiting tasks' resources, implement a proper synchronous mechanism to notify the user-space scheduler about the exiting tasks from the BPF component, using the .disable() callback.

When the user-space scheduler receives a queued task with a negative CPU number, it can then release all the resources associated with that task (which currently includes only the entry in the TaskInfoMap for now).

This allows to get rid of the TaskInfoMap periodic garbage collector routine, save a lot of syscalls in procfs (used to check if the pids were still alive), and improve the overall scheduler performance.

Instead of implementing a garbage collector to periodically free up
exiting tasks' resources, implement a proper synchronous mechanism to
notify the user-space scheduler about the exiting tasks from the BPF
component, using the .disable() callback.

When the user-space scheduler receives a queued task with a negative CPU
number, it can then release all the resources associated with that task
(which currently includes only the entry in the TaskInfoMap for now).

This allows to get rid of the TaskInfoMap periodic garbage collector
routine, save a lot of syscalls in procfs (used to check if the pids
were still alive), and improve the overall scheduler performance.

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
@htejun htejun merged commit 54363be into sched-ext:main Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants