mirror_zfs/module
LOLi 77d8a0f1a4 Fix hung z_zvol tasks during 'zfs receive'
During a receive operation zvol_create_minors_impl() can wait
needlessly for the prefetch thread because both share the same tasks
queue.  This results in hung tasks:

<3>INFO: task z_zvol:5541 blocked for more than 120 seconds.
<3>      Tainted: P           O  3.16.0-4-amd64
<3>"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.

The first z_zvol:5541 (zvol_task_cb) is waiting for the long running
traverse_prefetch_thread:260

root@linux:~# cat /proc/spl/taskq
taskq                       act  nthr  spwn  maxt   pri  mina
spl_system_taskq/0            1     2     0    64   100     1
	active: [260]traverse_prefetch_thread [zfs](0xffff88003347ae40)
	wait: 5541
spl_delay_taskq/0             0     1     0     4   100     1
	delay: spa_deadman [zfs](0xffff880039924000)
z_zvol/1                      1     1     0     1   120     1
	active: [5541]zvol_task_cb [zfs](0xffff88001fde6400)
	pend: zvol_task_cb [zfs](0xffff88001fde6800)

This change adds a dedicated, per-pool, prefetch taskq to prevent the
traverse code from monopolizing the global (and limited) system_taskq by
inappropriately scheduling long running tasks on it.

Reviewed-by: Albert Lee <trisk@forkgnu.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
Closes #6330 
Closes #6890 
Closes #7343
2018-03-30 12:10:01 -07:00
..
avl Support -fsanitize=address with --enable-asan 2018-01-10 10:49:27 -08:00
icp Change movaps to movups in AES-NI code 2018-01-31 15:17:56 -08:00
lua OpenZFS 9035 - zfs: this statement may fall through 2018-02-21 14:55:34 -08:00
nvpair Support -fsanitize=address with --enable-asan 2018-01-10 10:49:27 -08:00
unicode Support -fsanitize=address with --enable-asan 2018-01-10 10:49:27 -08:00
zcommon Project Quota on ZFS 2018-02-13 14:54:54 -08:00
zfs Fix hung z_zvol tasks during 'zfs receive' 2018-03-30 12:10:01 -07:00
.gitignore Improve gitignore 2017-05-25 10:14:13 -07:00
Makefile.in OpenZFS 7431 - ZFS Channel Programs 2018-02-08 15:28:18 -08:00