Function report |
Source Code:arch\x86\kernel\cpu\resctrl\rdtgroup.c |
Create Date:2022-07-28 08:12:06 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:mkdir_rdt_prepare
Proto:static int mkdir_rdt_prepare(struct kernfs_node *parent_kn, struct kernfs_node *prgrp_kn, const char *name, umode_t mode, enum rdt_group_type rtype, struct rdtgroup **r)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct kernfs_node * | parent_kn | |
struct kernfs_node * | prgrp_kn | |
const char * | name | |
umode_t | mode | |
enum rdt_group_type | rtype | |
struct rdtgroup ** | r |
2653 | files = 0 |
2656 | prdtgrp = rdtgroup_kn_lock_live(parent_kn) |
2657 | If Not prdtgrp Then |
2659 | Go to out_unlock |
2662 | If rtype == RDTMON_GROUP && ( mode == RDT_MODE_PSEUDO_LOCKSETUP || mode == RDT_MODE_PSEUDO_LOCKED ) Then |
2671 | rdtgrp = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc). |
2672 | If Not rdtgrp Then |
2697 | kernfs_get(kn) |
2700 | If ret Then |
2701 | rdt_last_cmd_puts("kernfs perm error\n") |
2702 | Go to out_destroy |
2705 | files = RFTYPE_BASE | BIT(RF_CTRLSHIFT + rtype) |
2706 | ret = rdtgroup_add_files(kn, files) |
2707 | If ret Then |
2708 | rdt_last_cmd_puts("kernfs fill error\n") |
2709 | Go to out_destroy |
2712 | If rdt_mon_capable Then |
2713 | ret = alloc_rmid() |
2714 | If ret < 0 Then |
2715 | rdt_last_cmd_puts("Out of RMIDs\n") |
2716 | Go to out_destroy |
2721 | If ret Then |
2722 | rdt_last_cmd_puts("kernfs subdir error\n") |
2723 | Go to out_idfree |
2726 | kernfs_activate(kn) |
2731 | Return 0 |
2733 | out_idfree : |
2735 | out_destroy : |
2736 | kernfs_remove(kn) |
2737 | out_free_rgrp : |
2739 | out_unlock : |
2740 | rdtgroup_kn_unlock(parent_kn) |
2741 | Return ret |
Name | Describe |
---|---|
rdtgroup_mkdir_mon | Create a monitor group under "mon_groups" directory of a control* and monitor group(ctrl_mon). This is a resource group* to monitor a subset of tasks and cpus in its parent ctrl_mon group. |
rdtgroup_mkdir_ctrl_mon | These are rdtgroups created under the root directory. Can be used* to allocate and monitor resources. |
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 |