lkml.org 
[lkml]   [2020]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH 4/2] sched/cpupri: Add CPUPRI_HIGHER
From
Date
On 14/10/2020 21:54, Peter Zijlstra wrote:
>
> Add CPUPRI_HIGHER above the RT99 priority to denote the CPU is in use
> by higher priority tasks (specifically deadline).

sugov:X already triggers this now on our !fast-switching devices running
schedutil.

> XXX: we should probably drive PUSH-PULL from cpupri, that would
> automagically result in an RT-PUSH when DL sets cpupri to CPUPRI_HIGHER.
>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>

[...]

> @@ -54,6 +56,10 @@ static int convert_prio(int prio)

The BUG_ON could be tightened:

- BUG_ON(prio >= MAX_PRIO);
+ BUG_ON(prio > MAX_RT_PRIO);

> case MAX_RT_PRIO-1:
> cpupri = CPUPRI_NORMAL; /* 0 */
> break;
> +
> + case MAX_RT_PRIO:
> + cpupri = CPUPRI_HIGHER; /* 100 */
> + break;
> }
>
> return cpupri;

Just saw that the comment for cpupri_set() needs changing:

@@ -205,7 +208,7 @@ int cpupri_find_fitness(struct cpupri *cp, struct
task_struct *p,
* cpupri_set - update the CPU priority setting
* @cp: The cpupri context
* @cpu: The target CPU
- * @newpri: The priority (INVALID-RT99) to assign to this CPU
+ * @newpri: The priority (INVALID-RT1-RT99-NORMAL-HIGHER) to assign to
this CPU

Reviewed-by: Dietmar Eggemann <dietmar.eggemann@arm.com>

\
 
 \ /
  Last update: 2020-10-19 16:15    [W:0.121 / U:1.672 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site