函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:标记当前进程需要被调度出去

函数原型:void resched_curr(struct rq *rq)

返回类型:void

参数:

类型参数名称
struct rq *rq
510  curr等于当前任务
513  lockdep_assert_held( & 运行队列锁)
515  如果检查进程是否已经设置了调度标志则返回
518  cpu等于根据rq获取CPU
520  如果cpu恒等于当前cpu ID()则
521  设置进程需要被调度出去的标志
522  设置CPU的内核抢占
523  返回
526  如果set_nr_and_not_polling(curr)则smp_send_reschedule(cpu)
528  否则Tracepoint for waking a polling cpu without an IPI.
调用者
名称描述
resched_cpu
check_preempt_curr
set_user_nice
yield_toyield_to - yield the current processor to another thread in* your thread group, or accelerate that thread toward the* processor it's on
check_preempt_curr_idleIdle tasks are unconditionally rescheduled:
check_preempt_tick检查当前进程是否需要被抢占
check_preempt_wakeupPreempt the current task with a newly woken task if needed:
task_fork_fairalled on fork with the child task as argument from the parent's context* - child not yet on the tasklist* - preemption disabled
prio_changed_fairPriority of the task has changed. Check to see if we preempt* the current task.
switched_to_fair
sched_rt_rq_enqueue
update_curr_rtUpdate the current task's runtime statistics. Skip current tasks that* are not in our scheduling class.
check_preempt_curr_rtPreempt the current task with a newly woken task if needed:
switched_to_rtWhen switching a task to RT, we may overload the runqueue* with RT tasks. In this case we try to push them off to* other runqueues.
prio_changed_rtPriority of the task has changed. This may cause* us to initiate a push or pull.
task_tick_rtscheduler tick hitting a task of our scheduling class
dl_task_timerThis is the bandwidth enforcement timer callback
update_curr_dlUpdate the current task's runtime statistics (provided it is still* a -deadline task and has not been removed from the dl_rq).
check_preempt_curr_dl
switched_to_dlWhen switching to -deadline, we may overload the rq, then* we try to push someone off, if possible.
prio_changed_dlIf the scheduling parameters of a -deadline task changed,* a push or pull operation might be needed.