Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\sched\fair.c Create Date:2022-07-28 09:38:12
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:We calculate the wall-time slice from the period by taking a part* proportional to the weight.* s = p*P[w/rw]

Proto:static u64 sched_slice(struct cfs_rq *cfs_rq, struct sched_entity *se)

Type:u64

Parameter:

TypeParameterName
struct cfs_rq *cfs_rq
struct sched_entity *se
693  slice = The idea is to set a period in which each task runs once.* When there are too many tasks (sched_nr_latency) we have to stretch* this period because otherwise the slices get too small.* p = (nr <= nl) ? l : l*nr/nl
699  cfs_rq = cfs_rq_of(se)
700  load = load
702  If Value for the false possibility is greater at compile time(!on_rq) Then
703  lw = load
705  update_load_add( & lw, weight)
706  load = lw
708  slice = delta_exec * weight / lw.weight* OR* (delta_exec * (weight * lw->inv_weight)) >> WMULT_SHIFT* Either weight := NICE_0_LOAD and lw \e sched_prio_to_wmult[], in which case* we're guaranteed shift stays positive because inv_weight is guaranteed to
710  Return slice
Caller
NameDescribe
sched_vsliceWe calculate the vruntime slice of a to-be-inserted task.* vs = s/w
check_preempt_tickPreempt the current task with a newly woken task if needed:
get_rr_interval_fair