Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

Proto:static int update_cpumask(struct cpuset *cs, struct cpuset *trialcs, const char *buf)

Type:int

Parameter:

TypeParameterName
struct cpuset *cs
struct cpuset *trialcs
const char *buf
1481  If cs == top_cpuset Then Return -EACCES
1490  If Not buf Then
1491  pumask_clear - clear all cpus (< nr_cpu_ids) in a cpumask*@dstp: the cpumask pointer
1492  Else
1493  retval = pulist_parse - extract a cpumask from a user string of ranges*@buf: the buffer to extract from*@dstp: the cpumask to set.* Returns -errno, or 0 for success.
1494  If retval < 0 Then Return retval
1497  If Not pumask_subset - (*src1p & ~*src2p) == 0*@src1p: the first input*@src2p: the second input* Returns 1 if *@src1p is a subset of *@src2p, else returns 0 Then Return -EINVAL
1503  If pumask_equal - *src1p == *src2p*@src1p: the first input*@src2p: the second input Then Return 0
1506  retval = validate_change() - Used to validate that any proposed cpuset change* follows the structural rules for cpusets
1507  If retval < 0 Then Return retval
1520  If partition root state Then
1522  If pumask_empty - *srcp == 0*@srcp: the cpumask to that all cpus < nr_cpu_ids are clear. Then Return -EINVAL
1524  If pdate_parent_subparts_cpumask - update subparts_cpus mask of parent cpuset*@cpuset: The cpuset that requests change in partition root state*@cmd: Partition root state change command*@newmask: Optional new cpumask for partcmd_update*@tmp: Temporary addmask < 0 Then Return -EINVAL
1529  spin_lock_irq( & callback_lock)
1530  pumask_copy - *dstp = *srcp*@dstp: the result*@srcp: the input cpumask
1535  If number of CPUs in subparts_cpus Then
1536  pumask_andnot - *dstp = *src1p & ~*src2p*@dstp: the cpumask result*@src1p: the first input*@src2p: the second input* If *@dstp is empty, returns 0, else returns 1
1538  number of CPUs in subparts_cpus = pumask_weight - Count of bits in *srcp*@srcp: the cpumask to count bits (< nr_cpu_ids) in.
1540  spin_unlock_irq( & callback_lock)
1542  pdate_cpumasks_hier - Update effective cpumasks and tasks in the subtree*@cs: the cpuset to consider*@tmp: temp variables for calculating effective_cpus & partition setup* When congifured cpumask is changed, the effective cpumasks of this cpuset
1544  If partition root state Then
1545  parent = parent_cs(cs)
1551  If child_ecpus_count Then pdate_sibling_cpumasks - Update siblings cpumasks*@parent: Parent cpuset*@cs: Current cpuset*@tmp: Temp variables
1554  Return 0
Caller
NameDescribe
cpuset_write_resmaskCommon handling for a write to a "cpus" or "mems" file.