diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2010-11-12 07:12:29 -0500 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2010-11-12 12:08:03 -0500 |
commit | dcce240ead802d42b1e45ad2fcb2ed4a399cb255 (patch) | |
tree | f9531f06ad6e0987d3c6782cfe0a7ed335d82e48 /fs/dlm/lowcomms.c | |
parent | b36930dd508e00f0c5083bcd57d25de6d0375c76 (diff) |
dlm: Use cmwq for send and receive workqueues
So far as I can tell, there is no reason to use a single-threaded
send workqueue for dlm, since it may need to send to several sockets
concurrently. Both workqueues are set to WQ_MEM_RECLAIM to avoid
any possible deadlocks, WQ_HIGHPRI since locking traffic is highly
latency sensitive (and to avoid a priority inversion wrt GFS2's
glock_workqueue) and WQ_FREEZABLE just in case someone needs to do
that (even though with current cluster infrastructure, it doesn't
make sense as the node will most likely land up ejected from the
cluster) in the future.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm/lowcomms.c')
-rw-r--r-- | fs/dlm/lowcomms.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index 77720f89c879..1d4e644c6589 100644 --- a/fs/dlm/lowcomms.c +++ b/fs/dlm/lowcomms.c | |||
@@ -1451,14 +1451,16 @@ static void work_stop(void) | |||
1451 | static int work_start(void) | 1451 | static int work_start(void) |
1452 | { | 1452 | { |
1453 | int error; | 1453 | int error; |
1454 | recv_workqueue = create_workqueue("dlm_recv"); | 1454 | recv_workqueue = alloc_workqueue("dlm_recv", WQ_MEM_RECLAIM | |
1455 | WQ_HIGHPRI | WQ_FREEZEABLE, 0); | ||
1455 | error = IS_ERR(recv_workqueue); | 1456 | error = IS_ERR(recv_workqueue); |
1456 | if (error) { | 1457 | if (error) { |
1457 | log_print("can't start dlm_recv %d", error); | 1458 | log_print("can't start dlm_recv %d", error); |
1458 | return error; | 1459 | return error; |
1459 | } | 1460 | } |
1460 | 1461 | ||
1461 | send_workqueue = create_singlethread_workqueue("dlm_send"); | 1462 | send_workqueue = alloc_workqueue("dlm_send", WQ_MEM_RECLAIM | |
1463 | WQ_HIGHPRI | WQ_FREEZEABLE, 0); | ||
1462 | error = IS_ERR(send_workqueue); | 1464 | error = IS_ERR(send_workqueue); |
1463 | if (error) { | 1465 | if (error) { |
1464 | log_print("can't start dlm_send %d", error); | 1466 | log_print("can't start dlm_send %d", error); |