lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aXCgWBbISHjIB2_p@jlelli-thinkpadt14gen4.remote.csb>
Date: Wed, 21 Jan 2026 10:46:00 +0100
From: Juri Lelli <juri.lelli@...hat.com>
To: Yuri Andriaccio <yurand2000@...il.com>
Cc: Ingo Molnar <mingo@...hat.com>, Peter Zijlstra <peterz@...radead.org>,
	Vincent Guittot <vincent.guittot@...aro.org>,
	Dietmar Eggemann <dietmar.eggemann@....com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
	Valentin Schneider <vschneid@...hat.com>,
	linux-kernel@...r.kernel.org,
	Luca Abeni <luca.abeni@...tannapisa.it>,
	Yuri Andriaccio <yuri.andriaccio@...tannapisa.it>
Subject: Re: [RFC PATCH v4 13/28] sched/rt: Update task event callbacks for
 HCBS scheduling

Hello,

On 01/12/25 13:41, Yuri Andriaccio wrote:
> Update wakeup_preempt_rt, switched_{from/to}_rt and prio_changed_rt with
> rt-cgroup's specific preemption rules:
> 
> - In wakeup_preempt_rt(), whenever a task wakes up, it must be checked if
>   it is served by a deadline server or it lives on the global runqueue.
>   Preemption rules (as documented in the function), change based on the
>   current task and woken task runqueue:
>   - If both tasks are FIFO/RR tasks on the global runqueue, or the same
>     cgroup, run as normal.
>   - If woken is inside a cgroup, but curr is a FIFO task on the global
>     runqueue, always preempt. If curr is a DEADLINE task, check if the dl
>     server preempts curr.
>   - If both tasks are FIFO/RR tasks in served but different groups, check
>     whether the woken server preempts the current server.
> - In switched_from_rt(), perform a pull only on the global runqueue, and
>   do nothing if the task is inside a group. This will change when
>   migrations will be added.
> - In switched_to_rt(), queue a push only on the global runqueue, while
>   perform a priority check when the task switching is inside a group.
>   This will change also when migrations will be added.
> - In prio_changed_rt(), queue a pull only on the global runqueue, if the
>   task is not queued. If the task is queued, run preemption checks only
>   if both the prio changed task and curr are in the same cgroup.
> 
> Update sched_rt_can_attach() to check if a task can be attached to a given
> cgroup. For now the check only consists in checking if the group has
> non-zero bandwidth. Remove the tsk argument from sched_rt_can_attach, as
> it is unused.
> 
> Change cpu_cgroup_can_attach() to check if the attachee is a FIFO/RR
> task before attaching it to a cgroup.
> 
> Update __sched_setscheduler() to perform checks when trying to switch
> to FIFO/RR for a task inside a cgroup, as the group needs to have
> runtime allocated.
> 
> Update task_is_throttled_rt() for SCHED_CORE, returning the is_throttled
> value of the server if present, while global rt-tasks are never throttled.
> 
> Co-developed-by: Alessio Balsini <a.balsini@...up.it>
> Signed-off-by: Alessio Balsini <a.balsini@...up.it>
> Co-developed-by: Andrea Parri <parri.andrea@...il.com>
> Signed-off-by: Andrea Parri <parri.andrea@...il.com>
> Co-developed-by: luca abeni <luca.abeni@...tannapisa.it>
> Signed-off-by: luca abeni <luca.abeni@...tannapisa.it>
> Signed-off-by: Yuri Andriaccio <yurand2000@...il.com>
> ---

...

> @@ -1777,16 +1841,25 @@ prio_changed_rt(struct rq *rq, struct task_struct *p, int oldprio)
>  		 * If our priority decreases while running, we
>  		 * may need to pull tasks to this runqueue.
>  		 */
> -		if (oldprio < p->prio)
> -			rt_queue_pull_task(rt_rq_of_se(&p->rt));
> +		if (!IS_ENABLED(CONFIG_RT_GROUP_SCHED) && oldprio < p->prio)
> +			rt_queue_pull_task(rt_rq);

Does this mean priority decreases never trigger pulls when CONFIG_RT_
SCHED_GROUP is enabled, even for global runqueue?

Thanks,
Juri


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ