函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Handle user request to change the 'mems' memory placement* of a cpuset

函数原型:static int update_nodemask(struct cpuset *cs, struct cpuset *trialcs, const char *buf)

返回类型:int

参数:

类型参数名称
struct cpuset *cs
struct cpuset *trialcs
const char *buf
1771  如果cs恒等于top_cpuset
1772  retval等于负EACCES
1773  转到:done
1782  如果非buf
1783  nodes_clear(mems_allowed)
1784  否则
1785  retval等于nodelist_parse(buf, mems_allowed)
1786  如果retval小于0则转到:done
1789  如果非nodes_subset(mems_allowed, mems_allowed)则
1791  retval等于负EINVAL
1792  转到:done
1796  如果nodes_equal(mems_allowed, mems_allowed)则
1797  retval等于0
1798  转到:done
1800  retval等于validate_change() - Used to validate that any proposed cpuset change* follows the structural rules for cpusets
1801  如果retval小于0则转到: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  返回:retval
调用者
名称描述
cpuset_write_resmaskCommon handling for a write to a "cpus" or "mems" file.