Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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

Proto:static u64 __sched_period(unsigned long nr_running)

Type:u64

Parameter:

TypeParameterName
unsigned longnr_running
679  If Value for the false possibility is greater at compile time(nr_running > This value is kept at sysctl_sched_latency/sysctl_sched_min_granularity) Then Return nr_running * Minimal preemption granularity for CPU-bound tasks:* (default: 0.75 msec * (1 + ilog(ncpus)), units: nanoseconds)
681  Else Return Targeted preemption latency for CPU-bound tasks:* NOTE: this latency value is not the same as the concept of* 'timeslice length' - timeslices in CFS are of variable length* and have no persistent notion like in traditional, time-slice
Caller
NameDescribe
sched_sliceWe calculate the wall-time slice from the period by taking a part* proportional to the weight.* s = p*P[w/rw]