{"action":"created","issue":{"url":"https://api.github.com/repos/zfsonlinux/spl/issues/491","labels_url":"https://api.github.com/repos/zfsonlinux/spl/issues/491/labels{/name}","comments_url":"https://api.github.com/repos/zfsonlinux/spl/issues/491/comments","events_url":"https://api.github.com/repos/zfsonlinux/spl/issues/491/events","html_url":"https://github.com/zfsonlinux/spl/pull/491","id":114478178,"number":491,"title":"Provide kstat for taskqs in /proc/spl/taskqs","user":{"login":"dweeezil","id":1432005,"avatar_url":"https://avatars.githubusercontent.com/u/1432005?v=3","gravatar_id":"","url":"https://api.github.com/users/dweeezil","html_url":"https://github.com/dweeezil","followers_url":"https://api.github.com/users/dweeezil/followers","following_url":"https://api.github.com/users/dweeezil/following{/other_user}","gists_url":"https://api.github.com/users/dweeezil/gists{/gist_id}","starred_url":"https://api.github.com/users/dweeezil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dweeezil/subscriptions","organizations_url":"https://api.github.com/users/dweeezil/orgs","repos_url":"https://api.github.com/users/dweeezil/repos","events_url":"https://api.github.com/users/dweeezil/events{/privacy}","received_events_url":"https://api.github.com/users/dweeezil/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2015-11-01T16:09:52Z","updated_at":"2015-12-11T23:32:11Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/zfsonlinux/spl/pulls/491","html_url":"https://github.com/zfsonlinux/spl/pull/491","diff_url":"https://github.com/zfsonlinux/spl/pull/491.diff","patch_url":"https://github.com/zfsonlinux/spl/pull/491.patch"},"body":"I'm posting this as a WIP for further commentary and feedback.  I think the output is potentially useful as it stands but there's plenty that could be changed, added or deleted..  The main goal at the moment is to provide a way to help track down issues regarding dynamic taskqs but the information provided could certainly be useful in other contexts.\r\n\r\nAmong other things, I've thought about adding a nicer header line and grouping the columns, for example, into a \"tqent\" section, and others.  There are also likely some non-useful columns at the moment and maybe some others which ought to be added.\r\n\r\nOn a smaller test system running a bunch of ```zfs send``` and other miscellaneous things running current master code with dynamic taskqs enabled, here's a sample of the output:\r\n```\r\ntaskq                       act  nthr  spwn  maxt   pri  mina         maxa  cura      flags\r\nspl_kmem_cache/0              0     1     0     4   100    32   2147483647    32   80000005\r\nspl_system_taskq/0            1     1     0    64   100     8   2147483647     8   80000005\r\n\ttraverse_prefetch_thread [zfs](0xffff8800c690e420)\r\nspl_dynamic_taskq/0           0     1     0     1   100     8   2147483647     8   80000001\r\ndbu_evict/0                   0     1     0     1   120     0            0     0   80000000\r\narc_prune/0                   0     1     0     8   120     8   2147483647     8   80000005\r\nz_unmount/0                   0     1     0     1   120     1            8     1   80000001\r\nz_null_iss/0                  0     1     0     1   100    50   2147483647     0   80000004\r\nz_null_int/0                  0     1     0     1   100    50   2147483647     0   80000004\r\nz_rd_iss/0                    0     1     0     8   100    50   2147483647     0   80000004\r\nz_rd_int_0/0                  0     1     0    12   100    50   2147483647     0   80000004\r\nz_rd_int_1/0                  0     1     0    12   100    50   2147483647     0   80000004\r\n...\r\nz_rd_int_1/1                  0     1     0    12   100    50   2147483647     0   80000004\r\nz_rd_int_2/1                  0     1     0    12   100    50   2147483647     0   80000004\r\nz_rd_int_3/1                  0     1     0    12   100    50   2147483647     0   80000004\r\nz_rd_int_4/1                  1     1     0    12   100    50   2147483647     0   80000004\r\n\tzio_execute [zfs](0xffff8802256fc1a0)\r\nz_rd_int_5/1                  0     1     0    12   100    50   2147483647     0   80000004\r\nz_rd_int_6/1                  0     1     0    12   100    50   2147483647     0   80000004\r\nz_rd_int_7/1                  0     1     0    12   100    50   2147483647     0   80000004\r\nz_wr_iss/1                    0     1     0     6   101    50   2147483647     0   8000000c\r\nz_wr_iss_h/1                  0     1     0     5   100    50   2147483647     0   80000004\r\n...\r\nmetaslab_group_taskq/1        0     1     0     4   100    10   2147483647     0   8000000c\r\nmetaslab_group_taskq/2        0     1     0     4   100    10   2147483647     0   8000000c\r\nz_iput/1                      0     1     0     8   120    64   2147483647    64   80000005\r\n```\r\nThe \"/X\" in the name of the taskq is what I'm calling the \"instance number\".  It's a monotonically increasing integer to help distinguish otherwise identically-named taskqs."},"comment":{"url":"https://api.github.com/repos/zfsonlinux/spl/issues/comments/164077820","html_url":"https://github.com/zfsonlinux/spl/pull/491#issuecomment-164077820","issue_url":"https://api.github.com/repos/zfsonlinux/spl/issues/491","id":164077820,"user":{"login":"behlendorf","id":148917,"avatar_url":"https://avatars.githubusercontent.com/u/148917?v=3","gravatar_id":"","url":"https://api.github.com/users/behlendorf","html_url":"https://github.com/behlendorf","followers_url":"https://api.github.com/users/behlendorf/followers","following_url":"https://api.github.com/users/behlendorf/following{/other_user}","gists_url":"https://api.github.com/users/behlendorf/gists{/gist_id}","starred_url":"https://api.github.com/users/behlendorf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/behlendorf/subscriptions","organizations_url":"https://api.github.com/users/behlendorf/orgs","repos_url":"https://api.github.com/users/behlendorf/repos","events_url":"https://api.github.com/users/behlendorf/events{/privacy}","received_events_url":"https://api.github.com/users/behlendorf/received_events","type":"User","site_admin":false},"created_at":"2015-12-11T23:32:11Z","updated_at":"2015-12-11T23:32:11Z","body":"@dweeezil it sounds like this is very close to ready."}}