Skip to content

dlm: bring message parsing to softirq context

Alexander Aring gfs2 4 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest15 patches 0 repliesNew
  2. v318 patches 0 repliesSuperseded
  3. v213 patches 1 replySuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v110 patches1 replySuperseded

Changes in v4 from the cover letter

- add patches that got meanwhile on the mailinglist to resend them.
- add "remove schedule in dlm receive path" to remove a schedule() in the dlm msg processing path.
- change commit message of "dlm: do dlm message processing in softirq context" to mention the

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/15dlm: Simplify the allocation of slab caches in dlm_lowcomms_msg_cache_createfs/dlm/lowcomms.c+1 -10 replies
2/15dlm: remove allocation parameter in msg allocationfs/dlm/lock.c fs/dlm/lowcomms.c fs/dlm/lowcomms.h +5 more+41 -570 replies
3/15dlm: switch to GFP_ATOMIC in dlm allocationsfs/dlm/lock.c fs/dlm/memory.c fs/dlm/recover.c +1 more+4 -80 replies
4/15dlm: move root_list functionality to recover.cfs/dlm/recover.c fs/dlm/recover.h fs/dlm/recoverd.c+39 -440 replies
5/15dlm: move master dir dump to own listfs/dlm/dir.c fs/dlm/dlm_internal.h fs/dlm/lock.c +2 more+79 -140 replies
6/15dlm: move root_list to ls_recover() stackfs/dlm/dir.c fs/dlm/dir.h fs/dlm/dlm_internal.h +6 more+47 -700 replies
7/15dlm: implement directory dump contextfs/dlm/dir.c fs/dlm/dlm_internal.h fs/dlm/lockspace.c +1 more+116 -100 replies
8/15dlm: drop holding waiters mutex in waiters recoveryfs/dlm/debug_fs.c fs/dlm/lock.c fs/dlm/lock.h+23 -80 replies
9/15dlm: convert ls_waiters_mutex to spinlockfs/dlm/debug_fs.c fs/dlm/dlm_internal.h fs/dlm/lock.c +1 more+14 -140 replies
10/15dlm: convert res_lock to spinlockfs/dlm/dlm_internal.h fs/dlm/lock.c fs/dlm/lock.h+4 -40 replies
11/15dlm: make requestqueue handling non sleepablefs/dlm/dlm_internal.h fs/dlm/lock.c fs/dlm/lockspace.c +2 more+30 -410 replies
12/15dlm: ls_recv_active semaphore to rwlockfs/dlm/dlm_internal.h fs/dlm/lock.c fs/dlm/lockspace.c +2 more+8 -80 replies
13/15dlm: remove schedule in dlm receive pathfs/dlm/lock.c+0 -10 replies
14/15dlm: convert message parsing locks to disable bhfs/dlm/ast.c fs/dlm/debug_fs.c fs/dlm/dir.c +11 more+287 -2580 replies
15/15dlm: do dlm message processing in softirq contextfs/dlm/lowcomms.c+20 -80 replies

Reviews trailers per patch

1 of 15 patches has a Reviewed-by or Acked-by.

PatchAlexander Aring
1/15A-b
2/15
3/15
4/15
5/15
6/15
7/15
8/15
9/15
10/15
11/15
12/15
13/15
14/15
15/15

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCHv4 dlm/next 00/15] dlm: bring message parsing to softirq context

Hi,

this is version 4 of my attempt to bring dlm message parsing to softirq context. This will "minimal" improve the dlm message parsing that is still message after message parsing. There is still a context switch involed that is the dlm callback workqueue. This patch mostly have the effect that we call "queue_work()" more often. In future we will get rid of the dlm callback workqueue and call the DLM user callback directly in the dlm message processing softirq context. However this requires that DLM users adapt the changes and signal this capability over a new lockspace flag.

- Alex

changes since v4:
- add still "dlm: Simplify the allocation of slab caches in dlm_lowcomms_msg_cache_create" that was forgotten in the last patch series.
- update commit message to hopefully more clear
- use new WQ_BH instead of tasklets
- use trylock and return -EAGAIN if debugfs cannot access waiters due recovery is going on
- move clear of root_list in its own goto label instead doing it when its already cleared
- introduce dlm_refcount_dec_and_lock_bh() that hopefully can be later moved into refcount code instead of local_bh_disable/enable all the time

changes since v3:
- add patches that got meanwhile on the mailinglist to resend them.
- add "remove schedule in dlm receive path" to remove a schedule() in the dlm msg processing path.
- change commit message of "dlm: do dlm message processing in softirq context" to mention the

changes since v2:

I changed in v2 that we split the root_list to root_list and a per lockspace masters list. The root_list can be used as a stack list variable in ls_recover() as it's only used for recovery handling. The masters list is somehow special because it is being used for other dlm nodes to dump the nodes master rsbs. The current implementation guarantees that this happens in a very special part of the recovery handling by using a kind of distributed cluster barriers. I added more sanity checks for this handling and a more per node based recovery log mechanism. There is also a TODO that describes we should keep track of all masters rsb while lockspace locking handling and not create them while recovery handling which I think should improve the handling to maybe get rid of those barriers.

Alexander Aring (14):
dlm: remove allocation parameter in msg allocation
dlm: switch to GFP_ATOMIC in dlm allocations
dlm: move root_list functionality to recover.c
dlm: move master dir dump to own list
dlm: move root_list to ls_recover() stack
dlm: implement directory dump context
dlm: drop holding waiters mutex in waiters recovery
dlm: convert ls_waiters_mutex to spinlock
dlm: convert res_lock to spinlock
dlm: make requestqueue handling non sleepable
dlm: ls_recv_active semaphore to rwlock
dlm: remove schedule in dlm receive path
dlm: convert message parsing locks to disable bh
dlm: do dlm message processing in softirq context

Kunwu Chan (1):
dlm: Simplify the allocation of slab caches in
dlm_lowcomms_msg_cache_create

 fs/dlm/ast.c          |  12 +-
 fs/dlm/debug_fs.c     |  41 ++++---
 fs/dlm/dir.c          | 147 +++++++++++++++++++----
 fs/dlm/dir.h          |   3 +-
 fs/dlm/dlm_internal.h |  20 ++--
 fs/dlm/lock.c         | 271 +++++++++++++++++++++++-------------------
 fs/dlm/lock.h         |   7 +-
 fs/dlm/lockspace.c    |  65 +++++-----
 fs/dlm/lowcomms.c     |  62 ++++++----
 fs/dlm/lowcomms.h     |   5 +-
 fs/dlm/member.c       |  23 ++--
 fs/dlm/memory.c       |  14 +--
 fs/dlm/memory.h       |   4 +-
 fs/dlm/midcomms.c     |  64 +++++-----
 fs/dlm/midcomms.h     |   3 +-
 fs/dlm/rcom.c         |  33 +++--
 fs/dlm/recover.c      | 126 ++++++--------------
 fs/dlm/recover.h      |  10 +-
 fs/dlm/recoverd.c     | 142 ++++++++++++++++++----
 fs/dlm/requestqueue.c |  43 ++-----
 fs/dlm/user.c         |  32 ++---
 21 files changed, 647 insertions(+), 480 deletions(-)
Signature · 1 line
2.43.0