Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\cgroup\cpuset.c Create Date:2022-07-28 11:17:35
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:CPU / memory hotplug is handled asynchronously.

Proto:static void cpuset_hotplug_workfn(struct work_struct *work)

Type:void

Parameter:

TypeParameterName
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  If on_dfl && Not 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. Then 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 = Not pumask_equal - *src1p == *src2p*@src1p: the first input*@src2p: the second input
3142  mems_updated = Not nodes_equal(effective_mems, new_mems)
3145  If cpus_updated Then
3146  spin_lock_irq( & callback_lock)
3147  If Not on_dfl Then pumask_copy - *dstp = *srcp*@dstp: the result*@srcp: the input cpumask
3160  Else
3165  pumask_copy - *dstp = *srcp*@dstp: the result*@srcp: the input cpumask
3166  spin_unlock_irq( & callback_lock)
3171  If mems_updated Then
3172  spin_lock_irq( & callback_lock)
3173  If Not on_dfl Then mems_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  If cpus_updated || mems_updated Then
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  If cpus_updated || force_rebuild Then
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