workqueue: Introduce show_one_worker_pool and show_one_workqueue.
authorImran Khan <imran.f.khan@oracle.com>
Wed, 20 Oct 2021 03:09:00 +0000 (14:09 +1100)
committerTejun Heo <tj@kernel.org>
Wed, 20 Oct 2021 16:19:03 +0000 (06:19 -1000)
commit55df0933be74bd2e52aba0b67eb743ae0feabe7e
tree54a62b412e5ba35f55f82eeaf9fa5b0884901010
parentd25302e46592c97d29f70ccb1be558df31a9a360
workqueue: Introduce show_one_worker_pool and show_one_workqueue.

Currently show_workqueue_state shows the state of all workqueues and of
all worker pools. In certain cases we may need to dump state of only a
specific workqueue or worker pool. For example in destroy_workqueue we
only need to show state of the workqueue which is getting destroyed.

So rename show_workqueue_state to show_all_workqueues(to signify it
dumps state of all busy workqueues) and divide it into more granular
functions (show_one_workqueue and show_one_worker_pool), that would show
states of individual workqueues and worker pools and can be used in
cases such as the one mentioned above.

Also, as mentioned earlier, make destroy_workqueue dump data pertaining
to only the workqueue that is being destroyed and make user(s) of
earlier interface(show_workqueue_state), use new interface
(show_all_workqueues).

Signed-off-by: Imran Khan <imran.f.khan@oracle.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
drivers/tty/sysrq.c
include/linux/workqueue.h
kernel/power/process.c
kernel/workqueue.c