函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:validate_change() - Used to validate that any proposed cpuset change* follows the structural rules for cpusets

函数原型:static int validate_change(struct cpuset *cur, struct cpuset *trial)

返回类型:int

参数:

类型参数名称
struct cpuset *cur
struct cpuset *trial
569  _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
572  ret等于负EBUSY
573  cpuset_for_each_child - traverse online children of a cpuset*@child_cs: loop cursor pointing to the current child*@pos_css: used for iteration*@parent_cs: target cpuset to walk children of* Walk @child_cs through the online children of @parent_cs(c, css, cur)
574  如果非s_cpuset_subset(p, q) - Is cpuset p a subset of cpuset q?* One cpuset is a subset of another if all its allowed CPUs and* Memory Nodes are a subset of the other, and its exclusive flags* are only set if the other's are set. Call holding cpuset_mutex.则转到:out
578  ret等于0
579  如果cur恒等于top_cpuset则转到:out
582  par等于parent_cs(cur)
585  ret等于负EACCES
586  如果非Cgroup v2 behavior is used when on default hierarchy or the* cgroup_v2_mode flag is set.且非s_cpuset_subset(p, q) - Is cpuset p a subset of cpuset q?* One cpuset is a subset of another if all its allowed CPUs and* Memory Nodes are a subset of the other, and its exclusive flags* are only set if the other's are set. Call holding cpuset_mutex.则转到:out
593  ret等于负EINVAL
594  cpuset_for_each_child - traverse online children of a cpuset*@child_cs: loop cursor pointing to the current child*@pos_css: used for iteration*@parent_cs: target cpuset to walk children of* Walk @child_cs through the online children of @parent_cs(c, css, par)
595  如果is_cpu_exclusive(trial)或is_cpu_exclusive(c)的值且c不等于curpumask_intersects - (*src1p & *src2p) != 0*@src1p: the first input*@src2p: the second input则转到:out
599  如果is_mem_exclusive(trial)或is_mem_exclusive(c)的值且c不等于curnodes_intersects(mems_allowed, mems_allowed)则转到:out
609  ret等于负ENOSPC
610  如果 synchronization, the result can only be used as a hint * Tasks are being attached to this cpuset. Used to prevent * zeroing cpus/mems_allowed between ->can_attach() and ->attach().
611  如果非pumask_empty - *srcp == 0*@srcp: the cpumask to that all cpus < nr_cpu_ids are clear.pumask_empty - *srcp == 0*@srcp: the cpumask to that all cpus < nr_cpu_ids are clear.则转到:out
614  如果非nodes_empty(mems_allowed)且nodes_empty(mems_allowed)则转到:out
623  ret等于负EBUSY
624  如果is_cpu_exclusive(cur)且非cpuset_cpumask_can_shrink( user-configured CPUs and Memory Nodes allow to tasks , user-configured CPUs and Memory Nodes allow to tasks )则转到:out
629  ret等于0
630  out :
631  _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()
632  返回:ret
调用者
名称描述
update_cpumaskpdate_cpumask - update the cpus_allowed mask of a cpuset and all tasks in it*@cs: the cpuset to consider*@trialcs: trial cpuset*@buf: buffer of cpu numbers written to this cpuset
update_nodemaskHandle user request to change the 'mems' memory placement* of a cpuset
update_flagpdate_flag - read a 0 or a 1 in a file and update associated flag* Call with cpuset_mutex held.