mirror of
https://github.com/sched-ext/scx.git
synced 2024-11-28 13:40:28 +00:00
scx_lavd: add LAVD_VDL_LOOSENESS_FT in calculating virtual deadline
LAVD_VDL_LOOSENESS_FT represents how loose the deadline is. The smaller value means the deadline is tighter. While it is unlikely to be tuned, let's keep it as a tunable for now. Signed-off-by: Changwoo Min <changwoo@igalia.com>
This commit is contained in:
parent
e94070d5ca
commit
c653622ed9
@ -60,6 +60,7 @@ enum consts {
|
||||
LAVD_SLICE_MIN_NS = (30 * NSEC_PER_USEC), /* min time slice */
|
||||
LAVD_SLICE_MAX_NS = ( 3 * NSEC_PER_MSEC), /* max time slice */
|
||||
LAVD_SLICE_UNDECIDED = SCX_SLICE_INF,
|
||||
LAVD_VDL_LOOSENESS_FT = 100,
|
||||
|
||||
LAVD_LC_FREQ_MAX = 1000000,
|
||||
LAVD_LC_RUNTIME_MAX = LAVD_TARGETED_LATENCY_NS,
|
||||
|
@ -1092,21 +1092,17 @@ static void boost_lat(struct task_struct *p, struct task_ctx *taskc,
|
||||
taskc->lat_cri = log2_u64(lat_cri_raw + 1) + is_wakeup;
|
||||
}
|
||||
|
||||
static u64 calc_virtual_deadline_delta(struct task_struct *p,
|
||||
struct task_ctx *taskc,
|
||||
struct cpu_ctx *cpuc,
|
||||
u64 enq_flags)
|
||||
static void calc_virtual_deadline_delta(struct task_struct *p,
|
||||
struct task_ctx *taskc,
|
||||
struct cpu_ctx *cpuc,
|
||||
u64 enq_flags)
|
||||
{
|
||||
u64 vdeadline_delta_ns;
|
||||
bool is_wakeup;
|
||||
|
||||
is_wakeup = is_wakeup_ef(enq_flags);
|
||||
boost_lat(p, taskc, cpuc, is_wakeup);
|
||||
vdeadline_delta_ns = (taskc->run_time_ns * 1000) / taskc->lat_cri;
|
||||
|
||||
taskc->vdeadline_delta_ns = vdeadline_delta_ns;
|
||||
|
||||
return vdeadline_delta_ns;
|
||||
taskc->vdeadline_delta_ns = (taskc->run_time_ns *
|
||||
LAVD_VDL_LOOSENESS_FT) / taskc->lat_cri;
|
||||
}
|
||||
|
||||
static u64 calc_task_load_actual(struct task_ctx *taskc)
|
||||
|
Loading…
Reference in New Issue
Block a user