函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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
注解内核,赢得工具下载SCCTEnglish

函数名称: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_tnbytes
enum psi_resres
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_SOMEres乘2
1020  否则如果sscanf - Unformat a buffer into a list of arguments*@buf: input buffer*@fmt: formatting of buffer*@...: resulting arguments恒等于2则state等于PSI_IO_FULLres乘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则返回:错误号
1036  t等于开辟内存
1037  如果非t则返回:错误号
1040  group等于group
1041  state等于state
1042  threshold等于threshold_usNSEC_PER_USEC
1043  size等于window_usNSEC_PER_USEC
1044  Trigger tracking window manupulations
1046  event等于0
1047  last_event_time等于0
1048  init_waitqueue_head( & event_wait)
1049  初始化对象
1051  mutex_lock( & trigger_lock)
1053  如果非cu_access_pointer() - fetch RCU pointer with no dereferencing*@p: The pointer to read* Return the value of the specified RCU-protected pointer, but omit the* lockdep checks for being in an RCU read-side critical section(poll_kworker)则
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  如果是错误
1061  释放内存
1063  返回:错误指示
1065  改变调度策略和线程优先级
1066  kthread_init_delayed_work( & poll_work, psi_poll_work)
1068  cu_assign_pointer() - assign to RCU-protected pointer*@p: pointer to assign to*@v: value to assign (publish)* Assigns the specified value to the specified RCU-protected* pointer, ensuring that any concurrent RCU readers will see* any prior initialization(poll_kworker, kworker)
1071  添加链表项
1072  poll_min_period等于两数取小(poll_min_period, div_u64 - unsigned 64bit divide with 32bit divisor*@dividend: unsigned 64bit dividend*@divisor: unsigned 32bit divisor* This is the most common 64bit divide and should be used if possible,* as many 32bit archs can optimize this variant better than a full )
1074  nr_triggers[state]自加
1075  poll_states或等于1左移state
1077  mutex_unlock( & trigger_lock)
1079  返回:t
调用者
名称描述
psi_write