Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

Proto:static int update_flag(cpuset_flagbits_t bit, struct cpuset *cs, int turning_on)

Type:int

Parameter:

TypeParameterName
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  If Not trialcs Then Return -ENOMEM
1882  If whether the flag is being set or cleared Then Atomically set a bit in memory
1884  Else 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  If err < 0 Then Go to 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  If Not pumask_empty - *srcp == 0*@srcp: the cpumask to that all cpus < nr_cpu_ids are clear. && balance_flag_changed Then rebuild_sched_domains_locked()
1904  If spread_flag_changed Then pdate_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  Return err
Caller
NameDescribe
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