函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\sched\core.c Create Date:2022-07-27 10:36:55
Last Modify:2022-05-22 13:40:38 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:__setscheduler_params

函数原型:static void __setscheduler_params(struct task_struct *p, const struct sched_attr *attr)

返回类型:void

参数:

类型参数名称
struct task_struct *p
const struct sched_attr *attr
4698  policy等于sched_policy
4700  如果policy恒等于sched_setparam() passes in -1 for its policy, to let the functions* it calls know not to change it.policy等于任务调度策略
4703  任务调度策略等于policy
4705  如果dl_policy(policy)则This function initializes the sched_dl_entity of a newly becoming* SCHED_DEADLINE task.* Only the static values are considered here, the actual runtime and the* absolute deadline will be properly calculated when the task is enqueued
4707  否则如果fair_policy(policy)则静态优先级等于Convert user-nice values [ -20 ... 0 ... 19 ]* to static priority [ MAX_RT_PRIO..MAX_PRIO-1 ],* and back.(SCHED_NORMAL, SCHED_BATCH )
4715  实时任务优先级等于SCHED_FIFO, SCHED_RR
4716  动态优先级等于Calculate the expected normal priority: i.e. priority* without taking RT-inheritance into account. Might be* boosted by interactivity modifiers. Changes upon fork,* setprio syscalls, and whenever the interactivity* estimator recalculates.
4717  set_load_weight(p, true)
调用者
名称描述
__setschedulerActually do priority change: must hold pi & rq lock.