函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\workqueue.c Create Date:2022-07-27 10:28:17
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:show_pwq

函数原型:static void show_pwq(struct pool_workqueue *pwq)

返回类型:void

参数:

类型参数名称
struct pool_workqueue *pwq
4664  pool等于I: the associated pool
4667  bool has_in_flight = TSC's on different sockets may be reset asynchronously.* This may cause the TSC ADJUST value on socket 0 to be NOT 0., has_pending = false
4670  打印信息(" pwq %d:", I: pool ID )
4671  pr_cont_pool_info(pool)
4673  打印标准信息(" active=%d/%d refcnt=%d%s\n", L: nr of active works , L: max active works , L: reference count , !链表为空 ? " MAYDAY" : "")
4678  如果L: current_work's pwq 恒等于pwq
4679  has_in_flight = true
4680  退出
4683  如果has_in_flight
4684  bool comma = false
4686  打印信息(" in-flight:")
4688  如果L: current_work's pwq 不等于pwq则继续下一循环
4691  打印标准信息("%s %d%s:%ps", comma ? "," : "", task_pid_nr(I: worker task ), I: the workqueue to rescue ? "(RESCUER)" : "", L: current_work's fn )
4695  list_for_each_entry - iterate over list of given type*@pos: the type * to use as a loop cursor.*@head: the head for your list.*@member: the name of the list_head within the struct.(work, & L: scheduled works , entry)
4696  pr_cont_work(TSC's on different sockets may be reset asynchronously.* This may cause the TSC ADJUST value on socket 0 to be NOT 0., work)
4697  comma = true
4699  打印标准信息("\n")
4703  如果get_work_pwq(work)恒等于pwq
4704  has_pending = true
4705  退出
4708  如果has_pending
4709  bool comma = false
4711  打印信息(" pending:")
4713  如果get_work_pwq(work)不等于pwq则继续下一循环
4716  pr_cont_work(comma, work)
4717  comma等于非The first word is the work queue pointer and the flags rolled into* one(work)按位与WORK_STRUCT_LINKED的值
4719  打印标准信息("\n")
4722  如果非链表为空
4723  bool comma = false
4725  打印信息(" delayed:")
4727  pr_cont_work(comma, work)
4728  comma等于非The first word is the work queue pointer and the flags rolled into* one(work)按位与WORK_STRUCT_LINKED的值
4730  打印标准信息("\n")
调用者
名称描述
destroy_workqueuedestroy_workqueue - safely terminate a workqueue*@wq: target workqueue* Safely destroy a workqueue. All work currently pending will be done first.
show_workqueue_stateshow_workqueue_state - dump workqueue state* Called from a sysrq handler or try_to_freeze_tasks() and prints out* all busy workqueues and pools.