Skip to content

Commit

Permalink
dlm: Use cmwq for send and receive workqueues
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Steven Whitehouse authored and David Teigland committed Nov 12, 2010
1 parent b36930d commit dcce240
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fs/dlm/lowcomms.c
Original file line number Diff line number Diff line change
Expand Up @@ -1451,14 +1451,16 @@ static void work_stop(void)
static int work_start(void)
{
int error;
recv_workqueue = create_workqueue("dlm_recv");
recv_workqueue = alloc_workqueue("dlm_recv", WQ_MEM_RECLAIM |
WQ_HIGHPRI | WQ_FREEZEABLE, 0);
error = IS_ERR(recv_workqueue);
if (error) {
log_print("can't start dlm_recv %d", error);
return error;
}

send_workqueue = create_singlethread_workqueue("dlm_send");
send_workqueue = alloc_workqueue("dlm_send", WQ_MEM_RECLAIM |
WQ_HIGHPRI | WQ_FREEZEABLE, 0);
error = IS_ERR(send_workqueue);
if (error) {
log_print("can't start dlm_send %d", error);
Expand Down

0 comments on commit dcce240

Please sign in to comment.