mirror of
https://github.com/sched-ext/scx.git
synced 2024-11-26 04:30:23 +00:00
scx_lavd: incorporate a task's static priority in calculating its latency criticality
That's because static (nice) priority is a strong hint to distinguish latency-critical tasks. Signed-off-by: Changwoo Min <changwoo@igalia.com>
This commit is contained in:
parent
221f1fe12a
commit
4449d8e31c
@ -1079,7 +1079,15 @@ static void calc_lat_cri(struct task_struct *p, struct task_ctx *taskc)
|
||||
* a boost priority. We add +1 to guarantee the latency criticality
|
||||
* (log2-ed) is always positive.
|
||||
*/
|
||||
taskc->lat_cri = log2_u64(lat_cri_raw + 1);
|
||||
lat_cri = log2_u64(lat_cri_raw + 1);
|
||||
|
||||
/*
|
||||
* A user-provided nice value is a strong hint for latency-criticality.
|
||||
*/
|
||||
lat_cri += calc_static_prio_factor(p);
|
||||
lat_cri = max(lat_cri, 1);
|
||||
|
||||
taskc->lat_cri = lat_cri;
|
||||
}
|
||||
|
||||
static void calc_starv_cri(struct task_ctx *taskc, bool is_wakeup)
|
||||
|
Loading…
Reference in New Issue
Block a user