函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\cgroup\cpuset.c Create Date:2022-07-27 12:20:02
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:CPU / memory hotplug is handled asynchronously.

函数原型:static void cpuset_hotplug_workfn(struct work_struct *work)

返回类型:void

参数:

类型参数名称
struct work_struct *work
3124  on_dfl等于Cgroup v2 behavior is used when on default hierarchy or the* cgroup_v2_mode flag is set.
3125  struct tmpmasks tmp, * ptmp = NULL
3127  如果on_dfl且非alloc_cpumasks - allocate three cpumasks for cpuset*@cs: the cpuset that have cpumasks to be allocated.*@tmp: the tmpmasks structure pointer* Return: 0 if successful, -ENOMEM otherwise.* Only one of the two input arguments should be non-NULL.ptmp等于tmp
3130  percpu_down_write( & cpuset_rwsem)
3133  pumask_copy - *dstp = *srcp*@dstp: the result*@srcp: the input cpumask
3134  new_mems等于The following particular system nodemasks and operations* on them manage all possible and online nodes.[N_MEMORY]
3141  cpus_updated等于非pumask_equal - *src1p == *src2p*@src1p: the first input*@src2p: the second input
3142  mems_updated等于非nodes_equal(effective_mems, new_mems)
3145  如果cpus_updated
3146  spin_lock_irq( & callback_lock)
3147  如果非on_dflpumask_copy - *dstp = *srcp*@dstp: the result*@srcp: the input cpumask
3160  否则
3165  pumask_copy - *dstp = *srcp*@dstp: the result*@srcp: the input cpumask
3166  spin_unlock_irq( & callback_lock)
3171  如果mems_updated
3172  spin_lock_irq( & callback_lock)
3173  如果非on_dflmems_allowed等于new_mems
3175  effective_mems等于new_mems
3176  spin_unlock_irq( & callback_lock)
3177  pdate_tasks_nodemask - Update the nodemasks of tasks in the cpuset.*@cs: the cpuset in which each task's mems_allowed mask needs to be changed* Iterate through each task of @cs updating its mems_allowed to the* effective cpuset's
3180  percpu_up_write( & cpuset_rwsem)
3183  如果cpus_updatedmems_updated
3187  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
3198  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
3202  如果cpus_updatedforce_rebuild
3203  force_rebuild = false
3204  rebuild_sched_domains()
3207  _cpumasks - free cpumasks in a tmpmasks structure*@cs: the cpuset that have cpumasks to be free.*@tmp: the tmpmasks structure pointer