summaryrefslogtreecommitdiffstats
path: root/include/sys/zfs_context.h
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2011-05-06 15:12:15 -0700
committerBrian Behlendorf <[email protected]>2011-05-06 15:26:26 -0700
commit21ade34764d11498abece590b965ce766f31de88 (patch)
treec42ae469dd9f39192d951a851e421179170abcb4 /include/sys/zfs_context.h
parent3117dd0b9005eb76e483b9772c493883b82998bb (diff)
Disable direct reclaim for z_wr_* threads
The direct reclaim path in the z_wr_* threads must be disabled to ensure forward progress is always maintained for txg processing. This ensures that a txg will never get stuck waiting on itself because it entered the following memory reclaim callpath. ->prune_icache()->dispose_list()->zpl_clear_inode()->zfs_inactive() ->dmu_tx_assign()->dmu_tx_wait()->tgx_wait_open() It would be preferable to target this exact code path but the kernel offers no way to do this without custom patches. To avoid this we are forced to disable all reclaim for these threads. It should not be necessary to do this for other other z_* threads because they will not hold a txg open. Closes #232
Diffstat (limited to 'include/sys/zfs_context.h')
-rw-r--r--include/sys/zfs_context.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sys/zfs_context.h b/include/sys/zfs_context.h
index 2ac41e007..1027e7215 100644
--- a/include/sys/zfs_context.h
+++ b/include/sys/zfs_context.h
@@ -368,6 +368,7 @@ typedef void (task_func_t)(void *);
#define TASKQ_DYNAMIC 0x0004 /* Use dynamic thread scheduling */
#define TASKQ_THREADS_CPU_PCT 0x0008 /* Scale # threads by # cpus */
#define TASKQ_DC_BATCH 0x0010 /* Mark threads as batch */
+#define TASKQ_NORECLAIM 0x0020 /* Disable direct memory reclaim */
#define TQ_SLEEP KM_SLEEP /* Can block for memory */
#define TQ_NOSLEEP KM_NOSLEEP /* cannot block for memory; may fail */