]> git.proxmox.com Git - mirror_spl.git/commit
Provide kstat for taskqs
authorTim Chase <tim@chase2k.com>
Mon, 19 Oct 2015 12:47:52 +0000 (07:47 -0500)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 16 Dec 2015 17:35:22 +0000 (09:35 -0800)
commit200366f23f1a16874d78a07936c5a33f2d488022
tree6bd2f868fcd8a8118d986782da77de010d0b088a
parente0ed96fa43e1d34751ef8a750a7816852b1d09b3
Provide kstat for taskqs

This patch provides 2 new kstats to display task queues:

  /proc/spl/taskqs-all - Display all task queues
  /proc/spl/taskqs - Display only "active" task queues

A task queue is considered to be "active" if it currently has active
(running) threads or if any of its pending, priority, delay or waitq
lists are not empty.

If the task queue has running threads, displays each thread function's
address (symbolically, if possibly) and its argument.

If the task queue has a non-empty list of pending, priority or delayed
task queue entries (taskq_ent_t), displays each entry's thread function
address and arguemnt.

If the task queue has any waiters, displays each waiting task's pid.

Note: This patch also updates some comments in taskq.h which referred to
"taskq_t" when they should have referred to "taskq_ent_t".

Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #491
include/sys/taskq.h
module/spl/spl-proc.c
module/spl/spl-taskq.c