函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:pdate_flag - read a 0 or a 1 in a file and update associated flag* Call with cpuset_mutex held.

函数原型:static int update_flag(cpuset_flagbits_t bit, struct cpuset *cs, int turning_on)

返回类型:int

参数:

类型参数名称
cpuset_flagbits_tbit the bit to update (see cpuset_flagbits_t)
struct cpuset *cs the cpuset to update
intturning_on whether the flag is being set or cleared
1878  trialcs等于alloc_trial_cpuset - allocate a trial cpuset*@cs: the cpuset that the trial cpuset duplicates
1879  如果非trialcs则返回:负ENOMEM
1882  如果 whether the flag is being set or cleared设置内存位
1884  否则lear_bit - Clears a bit in memory*@nr: Bit to clear*@addr: Address to start counting from* This is a relaxed atomic operation (no implied memory barriers).
1887  err等于validate_change() - Used to validate that any proposed cpuset change* follows the structural rules for cpusets
1888  如果err小于0则转到:out
1891  balance_flag_changed等于is_sched_load_balance( the cpuset to update)不等于is_sched_load_balance(trialcs)
1894  spread_flag_changed等于is_spread_slab( the cpuset to update)不等于is_spread_slab(trialcs)或is_spread_page( the cpuset to update)不等于is_spread_page(trialcs)
1897  spin_lock_irq( & callback_lock)
1898  "unsigned long" so bitops work 等于 "unsigned long" so bitops work
1899  spin_unlock_irq( & callback_lock)
1901  如果非pumask_empty - *srcp == 0*@srcp: the cpumask to that all cpus < nr_cpu_ids are clear.balance_flag_changedrebuild_sched_domains_locked()
1904  如果spread_flag_changedpdate_tasks_flags - update the spread flags of tasks in the cpuset
1906  out :
1907  _cpuset - free the cpuset*@cs: the cpuset to be freed
1908  返回:err
调用者
名称描述
update_prstatepdate_prstate - update partititon_root_state* Call with cpuset_mutex held.
cpuset_write_u64
cpuset_css_offlineIf the cpuset being removed has its flag 'sched_load_balance'* enabled, then simulate turning sched_load_balance off, which* will call rebuild_sched_domains_locked(). That is not needed* in the default hierarchy where only changes in partition