Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Handle user request to change the 'mems' memory placement* of a cpuset

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

Type:int

Parameter:

TypeParameterName
struct cpuset *cs
struct cpuset *trialcs
const char *buf
1771  If cs == top_cpuset Then
1772  retval = -EACCES
1773  Go to done
1782  If Not buf Then
1783  nodes_clear(mems_allowed)
1784  Else
1785  retval = nodelist_parse(buf, mems_allowed)
1786  If retval < 0 Then Go to done
1789  If Not nodes_subset(mems_allowed, mems_allowed) Then
1791  retval = -EINVAL
1792  Go to done
1796  If nodes_equal(mems_allowed, mems_allowed) Then
1797  retval = 0
1798  Go to done
1800  retval = validate_change() - Used to validate that any proposed cpuset change* follows the structural rules for cpusets
1801  If retval < 0 Then Go to done
1804  spin_lock_irq( & callback_lock)
1805  mems_allowed = mems_allowed
1806  spin_unlock_irq( & callback_lock)
1809  pdate_nodemasks_hier - Update effective nodemasks and tasks in the subtree*@cs: the cpuset to consider*@new_mems: a temp variable for calculating new effective_mems* When configured nodemask is changed, the effective nodemasks of this cpuset
1810  done :
1811  Return retval
Caller
NameDescribe
cpuset_write_resmaskCommon handling for a write to a "cpus" or "mems" file.