sched/rt: Rename realtime_{prio, task}() to rt_or_dl_{prio, task}()
Some find the name realtime overloaded. Use rt_or_dl() as an alternative, hopefully better, name. Suggested-by: Daniel Bristot de Oliveira <bristot@redhat.com> Signed-off-by: Qais Yousef <qyousef@layalina.io> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/r/20240610192018.1567075-4-qyousef@layalina.io
This commit is contained in:
committed by
Peter Zijlstra
parent
b166af3db7
commit
ae04f69de0
@@ -347,7 +347,7 @@ static __always_inline int __waiter_prio(struct task_struct *task)
|
||||
{
|
||||
int prio = task->prio;
|
||||
|
||||
if (!realtime_prio(prio))
|
||||
if (!rt_or_dl_prio(prio))
|
||||
return DEFAULT_PRIO;
|
||||
|
||||
return prio;
|
||||
@@ -435,7 +435,7 @@ static inline bool rt_mutex_steal(struct rt_mutex_waiter *waiter,
|
||||
* Note that RT tasks are excluded from same priority (lateral)
|
||||
* steals to prevent the introduction of an unbounded latency.
|
||||
*/
|
||||
if (realtime_prio(waiter->tree.prio))
|
||||
if (rt_or_dl_prio(waiter->tree.prio))
|
||||
return false;
|
||||
|
||||
return rt_waiter_node_equal(&waiter->tree, &top_waiter->tree);
|
||||
|
||||
@@ -631,7 +631,7 @@ static inline bool rwsem_try_write_lock(struct rw_semaphore *sem,
|
||||
* if it is an RT task or wait in the wait queue
|
||||
* for too long.
|
||||
*/
|
||||
if (has_handoff || (!realtime_task(waiter->task) &&
|
||||
if (has_handoff || (!rt_or_dl_task(waiter->task) &&
|
||||
!time_after(jiffies, waiter->timeout)))
|
||||
return false;
|
||||
|
||||
@@ -914,7 +914,7 @@ static bool rwsem_optimistic_spin(struct rw_semaphore *sem)
|
||||
if (owner_state != OWNER_WRITER) {
|
||||
if (need_resched())
|
||||
break;
|
||||
if (realtime_task(current) &&
|
||||
if (rt_or_dl_task(current) &&
|
||||
(prev_owner_state != OWNER_WRITER))
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -237,7 +237,7 @@ __ww_ctx_less(struct ww_acquire_ctx *a, struct ww_acquire_ctx *b)
|
||||
int a_prio = a->task->prio;
|
||||
int b_prio = b->task->prio;
|
||||
|
||||
if (realtime_prio(a_prio) || realtime_prio(b_prio)) {
|
||||
if (rt_or_dl_prio(a_prio) || rt_or_dl_prio(b_prio)) {
|
||||
|
||||
if (a_prio > b_prio)
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user