Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\sched\core.c Create Date:2022-07-28 09:36:14
Last Modify:2022-05-22 13:40:38 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:set_user_nice

Proto:void set_user_nice(struct task_struct *p, long nice)

Type:void

Parameter:

TypeParameterName
struct task_struct *p
longnice
4516  If ask_nice - return the nice value of a given task.*@p: the task in question.* Return: The nice value [ -20 ... 0 ... 19 ]. == nice || nice < MIN_NICE || nice > MAX_NICE Then Return
4522  rq = ask_rq_lock - lock p->pi_lock and lock the rq @p resides on.
4523  update_rq_clock(rq)
4531  If task_has_dl_policy(p) || task_has_rt_policy(p) Then
4532  static_prio = Convert user-nice values [ -20 ... 0 ... 19 ]* to static priority [ MAX_RT_PRIO..MAX_PRIO-1 ],* and back.(nice)
4533  Go to out_unlock
4535  queued = task_on_rq_queued(p)
4536  running = task_current(rq, p)
4537  If queued Then dequeue_task(rq, p, Matches ENQUEUE_RESTORE | Matches ENQUEUE_NOCLOCK )
4539  If running Then put_prev_task(rq, p)
4542  static_prio = 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 = prio - old_prio
4548  If queued Then
4549  enqueue_task(rq, p, ENQUEUE_RESTORE | ENQUEUE_NOCLOCK)
4554  If delta < 0 || delta > 0 && task_running(rq, p) Then sched_curr - mark rq's current task 'to be rescheduled now'.* On UP this means the setting of the need_resched flag, on SMP it* might also involve a cross-CPU call to trigger the scheduler on* the target CPU.
4557  If running Then set_next_task(rq, p)
4559  out_unlock :
4560  task_rq_unlock(rq, p, & rf)
Caller
NameDescribe
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.