summaryrefslogtreecommitdiffstats
path: root/module/zfs/txg.c
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2014-07-13 14:35:19 -0400
committerBrian Behlendorf <[email protected]>2015-01-16 14:28:05 -0800
commit92119cc259ee2f9ebde14145f549d6313f557759 (patch)
treef401b89e39084c21c15049d26951a1e99d4aebef /module/zfs/txg.c
parentd958324f97f4668a2a6e4a6ce3e5ca09b71b31d9 (diff)
Mark IO pipeline with PF_FSTRANS
In order to avoid deadlocking in the IO pipeline it is critical that pageout be avoided during direct memory reclaim. This ensures that the pipeline threads can always make forward progress and never end up blocking on a DMU transaction. For this very reason Linux now provides the PF_FSTRANS flag which may be set in the process context. Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'module/zfs/txg.c')
-rw-r--r--module/zfs/txg.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/module/zfs/txg.c b/module/zfs/txg.c
index 4693762b8..81afeb373 100644
--- a/module/zfs/txg.c
+++ b/module/zfs/txg.c
@@ -483,15 +483,7 @@ txg_sync_thread(dsl_pool_t *dp)
vdev_stat_t *vs1, *vs2;
clock_t start, delta;
-#ifdef _KERNEL
- /*
- * Annotate this process with a flag that indicates that it is
- * unsafe to use KM_SLEEP during memory allocations due to the
- * potential for a deadlock. KM_PUSHPAGE should be used instead.
- */
- current->flags |= PF_NOFS;
-#endif /* _KERNEL */
-
+ (void) spl_fstrans_mark();
txg_thread_enter(tx, &cpr);
vs1 = kmem_alloc(sizeof (vdev_stat_t), KM_PUSHPAGE);