mirror_zfs/include
Richard Yao a430c11f0b Make taskq_member() use ->journal_info
The ->journal_info pointer in the task_struct is reserved for use by
filesystems and because the kernel can have multiple file systems on the
same stack due to direct reclaim, each filesystem that touches
->journal_info in a callback function will save the value at the start
of its frame and restore it at the end of its frame.  This allows us to
safely use ->journal_info to store a pointer to the taskq's struct in
taskq threads so that ZFS code paths can detect the presence of a taskq.
This could break if the ZFS code were to use taskq_member from the
context of direct reclaim. However, there are no such uses of it in that
manner, so this is safe.

This eliminates an O(N) list traversal under a spinlock with an O(1)
unlocked pointer comparison.

Signed-off-by: Richard Yao <ryao@gentoo.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: tuxoko <tuxoko@gmail.com>
Signed-off-by: Tim Chase <tim@chase2k.com>
Closes #500
2015-12-08 13:24:47 -08:00
..
fs Kernel header installation should respect --prefix 2014-10-28 09:31:48 -07:00
linux Retire rwsem_is_locked() compat 2015-06-10 16:35:48 -07:00
rpc Kernel header installation should respect --prefix 2014-10-28 09:31:48 -07:00
sharefs Kernel header installation should respect --prefix 2014-10-28 09:31:48 -07:00
sys Make taskq_member() use ->journal_info 2015-12-08 13:24:47 -08:00
util Support parallel build trees (VPATH builds) 2015-07-17 12:53:11 -07:00
vm Kernel header installation should respect --prefix 2014-10-28 09:31:48 -07:00
Makefile.am Retire legacy debugging infrastructure 2014-11-19 10:35:07 -08:00
spl-ctl.h Refresh links to web site 2013-03-04 19:09:34 -08:00
splat-ctl.h Update code to use misc_register()/misc_deregister() 2014-10-17 15:07:28 -07:00
strings.h Refresh links to web site 2013-03-04 19:09:34 -08:00
unistd.h Refresh links to web site 2013-03-04 19:09:34 -08:00