Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Perform scheduler related setup for a newly forked process p.* p is forked by current.* __sched_fork() is basic setup used by init_idle() too:

Proto:static void __sched_fork(unsigned long clone_flags, struct task_struct *p)

Type:void

Parameter:

TypeParameterName
unsigned longclone_flags
struct task_struct *p
2686  on_rq = 0
2688  on_rq = 0
2689  exec_start = 0
2690  sum_exec_runtime = 0
2691  prev_sum_exec_runtime = 0
2692  nr_migrations = 0
2693  vruntime = 0
2694  Initialization list head
2705  RB_CLEAR_NODE( & rb_node)
2706  init_dl_task_timer( & dl)
2707  init_dl_inactive_task_timer( & dl)
2708  __dl_clear_params(p)
2710  Initialization list head
2711  timeout = 0
2712  time_slice = sched_rr_timeslice
2713  on_rq = 0
2714  on_list = 0
2723  init_numa_balancing(clone_flags, p)
Caller
NameDescribe
sched_forkrk()/clone()-time setup:
init_idle_idle - set up an idle thread for a given CPU*@idle: task in question*@cpu: CPU the idle task belongs to* NOTE: this function does not set the idle thread's NEED_RESCHED* flag, to make booting more robust.