diff options
author | David Teigland <teigland@redhat.com> | 2011-04-05 14:16:24 -0400 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2011-07-15 13:30:43 -0400 |
commit | 23e8e1aaacb10d9f05e44a93e10ea4ee5b3838a5 (patch) | |
tree | 7c94bc4eeb9dfd85a26869003c56dc45fc6fd697 /fs/dlm/dlm_internal.h | |
parent | 883ba74f43092823d0ed4c6b21f0171e9b334607 (diff) |
dlm: use workqueue for callbacks
Instead of creating our own kthread (dlm_astd) to deliver
callbacks for all lockspaces, use a per-lockspace workqueue
to deliver the callbacks. This eliminates complications and
slowdowns from many lockspaces sharing the same thread.
Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm/dlm_internal.h')
-rw-r--r-- | fs/dlm/dlm_internal.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/dlm/dlm_internal.h b/fs/dlm/dlm_internal.h index 6614f335e25d..fe2860c02449 100644 --- a/fs/dlm/dlm_internal.h +++ b/fs/dlm/dlm_internal.h | |||
@@ -246,13 +246,15 @@ struct dlm_lkb { | |||
246 | struct list_head lkb_statequeue; /* rsb g/c/w list */ | 246 | struct list_head lkb_statequeue; /* rsb g/c/w list */ |
247 | struct list_head lkb_rsb_lookup; /* waiting for rsb lookup */ | 247 | struct list_head lkb_rsb_lookup; /* waiting for rsb lookup */ |
248 | struct list_head lkb_wait_reply; /* waiting for remote reply */ | 248 | struct list_head lkb_wait_reply; /* waiting for remote reply */ |
249 | struct list_head lkb_astqueue; /* need ast to be sent */ | ||
250 | struct list_head lkb_ownqueue; /* list of locks for a process */ | 249 | struct list_head lkb_ownqueue; /* list of locks for a process */ |
251 | struct list_head lkb_time_list; | 250 | struct list_head lkb_time_list; |
252 | ktime_t lkb_timestamp; | 251 | ktime_t lkb_timestamp; |
253 | ktime_t lkb_wait_time; | 252 | ktime_t lkb_wait_time; |
254 | unsigned long lkb_timeout_cs; | 253 | unsigned long lkb_timeout_cs; |
255 | 254 | ||
255 | struct mutex lkb_cb_mutex; | ||
256 | struct work_struct lkb_cb_work; | ||
257 | struct list_head lkb_cb_list; /* for ls_cb_delay or proc->asts */ | ||
256 | struct dlm_callback lkb_callbacks[DLM_CALLBACKS_SIZE]; | 258 | struct dlm_callback lkb_callbacks[DLM_CALLBACKS_SIZE]; |
257 | struct dlm_callback lkb_last_cast; | 259 | struct dlm_callback lkb_last_cast; |
258 | struct dlm_callback lkb_last_bast; | 260 | struct dlm_callback lkb_last_bast; |
@@ -504,8 +506,12 @@ struct dlm_ls { | |||
504 | 506 | ||
505 | struct miscdevice ls_device; | 507 | struct miscdevice ls_device; |
506 | 508 | ||
509 | struct workqueue_struct *ls_callback_wq; | ||
510 | |||
507 | /* recovery related */ | 511 | /* recovery related */ |
508 | 512 | ||
513 | struct mutex ls_cb_mutex; | ||
514 | struct list_head ls_cb_delay; /* save for queue_work later */ | ||
509 | struct timer_list ls_timer; | 515 | struct timer_list ls_timer; |
510 | struct task_struct *ls_recoverd_task; | 516 | struct task_struct *ls_recoverd_task; |
511 | struct mutex ls_recoverd_active; | 517 | struct mutex ls_recoverd_active; |
@@ -542,6 +548,7 @@ struct dlm_ls { | |||
542 | #define LSFL_RCOM_WAIT 4 | 548 | #define LSFL_RCOM_WAIT 4 |
543 | #define LSFL_UEVENT_WAIT 5 | 549 | #define LSFL_UEVENT_WAIT 5 |
544 | #define LSFL_TIMEWARN 6 | 550 | #define LSFL_TIMEWARN 6 |
551 | #define LSFL_CB_DELAY 7 | ||
545 | 552 | ||
546 | /* much of this is just saving user space pointers associated with the | 553 | /* much of this is just saving user space pointers associated with the |
547 | lock that we pass back to the user lib with an ast */ | 554 | lock that we pass back to the user lib with an ast */ |