summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorTim Chase <[email protected]>2016-08-21 08:22:32 -0500
committerBrian Behlendorf <[email protected]>2016-08-22 16:12:05 -0700
commit3e635ac15c093ad9f1ee263ac8e4b45917a1449c (patch)
treecb71b58c282c4a233ae072d8c92f2db5cbbf6446 /module
parent23827a4ca1fbbc95d58398a2ff65dc73e4605ab8 (diff)
Prevent reclaim in send_traverse_thread()
As is the case with traverse_prefetch_thread(), the deep stacks caused by traversal require disabling reclaim in the send traverse thread. Also, do the same for receive_writer_thread() in which similar problems have been observed. Signed-off-by: Tim Chase <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #4912 Closes #4998
Diffstat (limited to 'module')
-rw-r--r--module/zfs/dmu_send.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/module/zfs/dmu_send.c b/module/zfs/dmu_send.c
index 80f7dc1aa..56936cf23 100644
--- a/module/zfs/dmu_send.c
+++ b/module/zfs/dmu_send.c
@@ -573,6 +573,7 @@ send_traverse_thread(void *arg)
struct send_thread_arg *st_arg = arg;
int err;
struct send_block_record *data;
+ fstrans_cookie_t cookie = spl_fstrans_mark();
if (st_arg->ds != NULL) {
err = traverse_dataset_resume(st_arg->ds,
@@ -585,6 +586,7 @@ send_traverse_thread(void *arg)
data = kmem_zalloc(sizeof (*data), KM_SLEEP);
data->eos_marker = B_TRUE;
bqueue_enqueue(&st_arg->q, data, 1);
+ spl_fstrans_unmark(cookie);
}
/*
@@ -2737,6 +2739,8 @@ receive_writer_thread(void *arg)
{
struct receive_writer_arg *rwa = arg;
struct receive_record_arg *rrd;
+ fstrans_cookie_t cookie = spl_fstrans_mark();
+
for (rrd = bqueue_dequeue(&rwa->q); !rrd->eos_marker;
rrd = bqueue_dequeue(&rwa->q)) {
/*
@@ -2761,6 +2765,7 @@ receive_writer_thread(void *arg)
rwa->done = B_TRUE;
cv_signal(&rwa->cv);
mutex_exit(&rwa->mutex);
+ spl_fstrans_unmark(cookie);
}
static int