函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\sched\fair.c Create Date:2022-07-27 10:38:43
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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

函数原型:static u64 __sched_period(unsigned long nr_running)

返回类型:u64

参数:

类型参数名称
unsigned longnr_running
679  如果此条件成立可能性小(为编译器优化)(nr_running > This value is kept at sysctl_sched_latency/sysctl_sched_min_granularity)则返回:nr_runningMinimal preemption granularity for CPU-bound tasks:* (default: 0.75 msec * (1 + ilog(ncpus)), units: nanoseconds)
681  否则返回: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
调用者
名称描述
sched_slice分配给进程的运行时间