Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:sched_partition_write

Proto:static ssize_t sched_partition_write(struct kernfs_open_file *of, char *buf, size_t nbytes, loff_t off)

Type:ssize_t

Parameter:

TypeParameterName
struct kernfs_open_file *of
char *buf
size_tnbytes
loff_toff
2501  cs = css_cs(of_css(of))
2503  retval = -ENODEV
2505  buf = strstrip(buf)
2510  If Not strcmp(buf, "root") Then val = PRS_ENABLED
2512  Else if Not strcmp(buf, "member") Then val = Partition root states:* 0 - not a partition root* 1 - partition root* -1 - invalid partition root* None of the cpus in cpus_allowed can be put into the parent's* subparts_cpus. In this case, the cpuset is not a real partition* root anymore
2514  Else Return -EINVAL
2517  ss_get - obtain a reference on the specified css*@css: target css* The caller must already have a reference.
2518  get_online_cpus()
2519  percpu_down_write( & cpuset_rwsem)
2520  If Not venient tests for these bits Then Go to out_unlock
2523  retval = pdate_prstate - update partititon_root_state* Call with cpuset_mutex held.
2524  out_unlock :
2525  percpu_up_write( & cpuset_rwsem)
2526  put_online_cpus()
2527  ss_put - put a css reference*@css: target css* Put a reference obtained via css_get() and css_tryget_online().
2528  Return If retval Else nbytes