Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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.

Proto:void resched_curr(struct rq *rq)

Type:void

Parameter:

TypeParameterName
struct rq *rq
510  curr = curr
513  lockdep_assert_held( & runqueue lock: )
515  If test_tsk_need_resched(curr) Then Return
518  cpu = cpu_of(rq)
520  If cpu == smp_processor_id() Then
521  set_tsk_need_resched(curr)
522  We fold the NEED_RESCHED bit into the preempt count such that* preempt_enable() can decrement and test for needing to reschedule with a* single instruction.* We invert the actual bit, so that when the decrement hits 0 we know we both
523  Return
526  If set_nr_and_not_polling(curr) Then smp_send_reschedule(cpu)
528  Else Tracepoint for waking a polling cpu without an IPI.
Caller
NameDescribe
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_tickPreempt the current task with a newly woken task if needed:
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.