summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2011-05-06 15:21:58 -0700
committerBrian Behlendorf <[email protected]>2011-05-06 15:23:58 -0700
commit372c2572336468cbf60272aa7e735b7ca0c3807c (patch)
tree220258fdc89b6a64641a9790f8515f91b296798a /module
parentdde6b7b137f56894a45723e7b49227629cfd3bd5 (diff)
Add TASKQ_NORECLAIM flag
It has become necessary to be able to optionally disable direct memory reclaim for certain taskqs. To support this the TASKQ_NORECLAIM flags has been added which sets the PF_MEMALLOC bit for all threads in the taskq.
Diffstat (limited to 'module')
-rw-r--r--module/spl/spl-taskq.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c
index 5a17f1ccf..f9ee57035 100644
--- a/module/spl/spl-taskq.c
+++ b/module/spl/spl-taskq.c
@@ -371,6 +371,10 @@ taskq_thread(void *args)
ASSERT(tq);
current->flags |= PF_NOFREEZE;
+ /* Disable the direct memory reclaim path */
+ if (tq->tq_flags & TASKQ_NORECLAIM)
+ current->flags |= PF_MEMALLOC;
+
sigfillset(&blocked);
sigprocmask(SIG_BLOCK, &blocked, NULL);
flush_signals(current);