Re: [RFC PATCH v5 22/29] sched/rt: Add rt-cgroup migration functions

Peter Zijlstra
2026-05-05T15:24:42Z

On Thu, Apr 30, 2026 at 11:38:26PM +0200, Yuri Andriaccio wrote:
> From: luca abeni <luca.abeni@santannapisa.it>
>
> Add migration related functions:
>
> - group_find_lowest_rt_rq
> - group_find_lock_lowest_rt_rq
> Find (and lock) the lowest priority non-root runqueue where to migrate
> a given task.
>
> - group_pull_rt_task
> Try pull a task onto the given non-root runqueue.
>
> - group_push_rt_task
> - group_push_rt_tasks
> Try push tasks from the given non-root runqueue.
>
> - group_pull_rt_task_callback
> - group_push_rt_tasks_callback
> - rt_queue_push_from_group
> - rt_queue_pull_to_group
> Deferred execution of push and pull functions at balancing points.
>
> Update struct rq to include fields for deferred balancing of cgroup runqueues.
>
> ---
>
> The functions are only implemented here, to be hooked up later in the patchset.

These functions duplicate a ton of existing logic, is there really no
way to share?