Function report |
Source Code:kernel\cgroup\rdma.c |
Create Date:2022-07-28 11:15:09 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:rdmacg_resource_set_max
Proto:static ssize_t rdmacg_resource_set_max(struct kernfs_open_file *of, char *buf, size_t nbytes, loff_t off)
Type:ssize_t
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct kernfs_open_file * | of | |
| char * | buf | |
| size_t | nbytes | |
| loff_t | off |
| 428 | cg = css_rdmacg(of_css(of)) |
| 434 | enables = 0 |
| 439 | If Not dev_name Then |
| 444 | new_limits = kcalloc - allocate memory for an array. The memory is set to zero.*@n: number of elements.*@size: element size.*@flags: the type of memory to allocate (see kmalloc). |
| 445 | If Not new_limits Then |
| 450 | ret = rdmacg_parse_limits(options, new_limits, & enables) |
| 455 | mutex_lock( & Protects list of resource pools maintained on per cgroup basis* and rdma device list.) |
| 458 | If Not device Then |
| 463 | rpool = get_cg_rpool_locked(cg, device) |
| 470 | for_each_set_bit(i, & enables, RDMACG_RESOURCE_MAX) |
| 471 | set_resource_limit(rpool, i, new_limits[i]) |
| 473 | If count active user tasks of this pool == 0 && al number counts which are set to max == RDMACG_RESOURCE_MAX Then |
| 482 | dev_err : |
| 485 | parse_err : |
| 486 | kfree(new_limits) |
| 488 | err : |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |