函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:set_user_nice

函数原型:void set_user_nice(struct task_struct *p, long nice)

返回类型:void

参数:

类型参数名称
struct task_struct *p
longnice
4516  如果返回给定任务的值恒等于nicenice小于MIN_NICEnice大于MAX_NICE则返回
4522  rq等于ask_rq_lock - lock p->pi_lock and lock the rq @p resides on.
4523  更新rq运行时间
4531  如果task_has_dl_policy(p)或task_has_rt_policy(p)则
4532  静态优先级等于Convert user-nice values [ -20 ... 0 ... 19 ]* to static priority [ MAX_RT_PRIO..MAX_PRIO-1 ],* and back.(nice)
4533  转到:out_unlock
4535  queued等于进程处于任务队列
4536  running等于task_current(rq, p)
4537  如果queueddequeue_task(rq, p, Matches ENQUEUE_RESTORE | Matches ENQUEUE_NOCLOCK )
4539  如果runningput_prev_task(rq, p)
4542  静态优先级等于Convert user-nice values [ -20 ... 0 ... 19 ]* to static priority [ MAX_RT_PRIO..MAX_PRIO-1 ],* and back.(nice)
4543  set_load_weight(p, true)
4544  old_prio等于prio
4545  prio等于Calculate the current priority, i.e. the priority* taken into account by the scheduler. This value might* be boosted by RT tasks, or might be boosted by* interactivity modifiers. Will be RT if the task got* RT-boosted
4546  delta等于prioold_prio
4548  如果queued
4549  enqueue_task(rq, p, ENQUEUE_RESTORE | ENQUEUE_NOCLOCK)
4554  如果delta小于0或delta大于0且task_running(rq, p)则标记当前进程需要被调度出去
4557  如果runningset_next_task(rq, p)
4559  out_unlock :
4560  task_rq_unlock(rq, p, & rf)
调用者
名称描述
call_usermodehelper_exec_asyncThis is the task which runs the usermode application
create_workerreate_worker - create a new workqueue worker*@pool: pool the new worker will belong to* Create and start a new worker which is attached to @pool.* CONTEXT:* Might sleep. Does GFP_KERNEL allocations.* Return:* Pointer to the newly created worker.
rescuer_threadscuer_thread - the rescuer thread function*@__rescuer: self* Workqueue rescuer thread function
SYSCALL_DEFINE1sys_nice - change the priority of the current process.*@increment: priority increment* sys_setpriority is a more generic, but much slower function that* does similar things.
lock_torture_writerLock torture writer kthread. Repeatedly acquires and releases* the lock, checking for duplicate acquisitions.
lock_torture_readerLock torture reader kthread. Repeatedly acquires and releases* the reader lock.
rcu_torture_fakewriterRCU torture fake writer kthread. Repeatedly calls sync, with a random* delay between calls.
rcu_torture_readerRCU torture reader kthread. Repeatedly dereferences rcu_torture_current,* incrementing the corresponding element of the pipeline array. The* counter in the element should never be greater than 1, otherwise, the* RCU implementation is broken.
rcu_torture_fwd_progCarry out grace-period forward-progress testing.
rcu_torture_barrier_cbskthread function to register callbacks used to test RCU barriers.
rcu_perf_readerRCU perf reader kthread. Repeatedly does empty RCU read-side* critical section, minimizing update-side interference.
watchdogkthread which checks for tasks stuck in D state
ring_buffer_benchmark_init
khugepaged
kmemleak_scan_threadThread function performing automatic memory scanning. Unreferenced objects* at the end of a memory scan are reported but only the first time.
set_one_prioset the priority of a task* - the caller must hold the RCU read lock
ksm_scan_thread