函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\io-wq.c Create Date:2022-07-29 10:55:40
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:create_io_worker

函数原型:static bool create_io_worker(struct io_wq *wq, struct io_wqe *wqe, int index)

返回类型:bool

参数:

类型参数名称
struct io_wq *wq
struct io_wqe *wqe
intindex
609  acct等于acct[index]
612  worker等于根据内存节点分配内存
613  如果非worker则返回:false
616  _set - set a refcount's value*@r: the refcount*@n: value to which the refcount will be set
617  pprev = NULL
618  wqe等于wqe
619  spin_lock_init( & lock)
621  task等于kthread_create_on_node - create a kthread
623  如果是错误
624  释放内存
625  返回:false
628  spin_lock_irq( & lock)
629  hlist_nulls_add_head_rcu*@n: the element to add to the hash list
630  添加RCU链表项
631  flags或等于IO_WORKER_F_FREE
632  如果index恒等于IO_WQ_ACCT_BOUNDflags或等于IO_WORKER_F_BOUND
634  如果非nr_workersflags按位与IO_WORKER_F_BOUNDflags或等于IO_WORKER_F_FIXED
636  nr_workers自加
637  spin_unlock_irq( & lock)
639  如果index恒等于IO_WQ_ACCT_UNBOUNDatomic_inc( & How many processes does this user have? )
642  唤醒中断线程
643  返回:true
调用者
名称描述
io_wq_managerManager thread. Tasked with creating new workers, if we need them.