函数逻辑报告 |
Source Code:kernel\sched\psi.c |
Create Date:2022-07-27 10:47:14 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:psi_trigger_create
函数原型:struct *psi_trigger_create(struct psi_group *group, char *buf, size_t nbytes, enum psi_res res)
返回类型:struct
参数:
类型 | 参数 | 名称 |
---|---|---|
struct psi_group * | group | |
char * | buf | |
size_t | nbytes | |
enum psi_res | res |
1015 | 如果static_branch_likely( & psi_disabled)则返回:错误号 |
1018 | 如果sscanf - Unformat a buffer into a list of arguments*@buf: input buffer*@fmt: formatting of buffer*@...: resulting arguments恒等于2则state等于PSI_IO_SOME加res乘2 |
1020 | 否则如果sscanf - Unformat a buffer into a list of arguments*@buf: input buffer*@fmt: formatting of buffer*@...: resulting arguments恒等于2则state等于PSI_IO_FULL加res乘2 |
1022 | 否则返回:错误号 |
1025 | 如果state大于等于PSI_NONIDLE则返回:错误号 |
1028 | 如果window_us小于Min window size is 500ms 或window_us大于Max window size is 10s 则返回:错误号 |
1033 | 如果threshold_us恒等于0或threshold_us大于window_us则返回:错误号 |
1043 | size等于window_us乘NSEC_PER_USEC |
1046 | event等于0 |
1047 | last_event_time等于0 |
1048 | init_waitqueue_head( & event_wait) |
1049 | 初始化对象 |
1051 | mutex_lock( & trigger_lock) |
1054 | struct sched_param param = {sched_priority = 1, } |
1059 | kworker等于kthread_create_worker - create a kthread worker*@flags: flags modifying the default behavior of the worker*@namefmt: printf-style name for the kthread worker (task) |
1060 | 如果是错误则 |
1065 | 改变调度策略和线程优先级 |
1066 | kthread_init_delayed_work( & poll_work, psi_poll_work) |
1071 | 添加链表项 |
1074 | nr_triggers[state]自加 |
1075 | poll_states或等于1左移state位 |
1077 | mutex_unlock( & trigger_lock) |
1079 | 返回:t |
名称 | 描述 |
---|---|
psi_write |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |