Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-4801

spin lock contention in lock_res_and_lock

Details

    • Bug
    • Resolution: Fixed
    • Major
    • None
    • Lustre 2.4.1
    • lustre-2.4.0-26chaos
    • 3
    • 13209

    Description

      Our MDS experienced severe lock contention in lock_res_and_lock(). This had a large impact on client responsiveness because service threads were starved for CPU time. We have not yet identified the client workload that caused this problem. All active tasks had stack traces like this, but would eventually get scheduled out.

       ...
      __spin_lock
      lock_res_and_lock
      ldlm_handle_enqueue0
      mdt_handle_common
      mds_regular_handle
      ptlrpc_server_handle_request
      ...
      

      This raises the question of why the ldlm resource lock needs to be a spinlock. Couldn't we avoid this issue by converting it to a mutex? This question was raised in LU-3504.

      Attachments

        1. parallel_flock_v2.c
          3 kB
          Oleg Drokin
        2. parallel_flock.c
          3 kB
          Oleg Drokin

        Issue Links

          Activity

            [LU-4801] spin lock contention in lock_res_and_lock

            Patch has landed. We will look to deploy this on our production systems soon. Any further work needed we can reopen this ticket.

            simmonsja James A Simmons added a comment - Patch has landed. We will look to deploy this on our production systems soon. Any further work needed we can reopen this ticket.

            Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/39811/
            Subject: LU-4801 ldlm: discard l_lock from struct ldlm_lock.
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: bb6edb7b8eeec65f46f8eaeb135e5dde13bf7ad8

            gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/39811/ Subject: LU-4801 ldlm: discard l_lock from struct ldlm_lock. Project: fs/lustre-release Branch: master Current Patch Set: Commit: bb6edb7b8eeec65f46f8eaeb135e5dde13bf7ad8

            Neil Brown (neilb@suse.de) uploaded a new patch: https://review.whamcloud.com/39811
            Subject: LU-4801 ldlm: discard l_lock from struct ldlm_lock.
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: c634dbeb9e576574a903f83dfb9cf39cf8d5468b

            gerrit Gerrit Updater added a comment - Neil Brown (neilb@suse.de) uploaded a new patch: https://review.whamcloud.com/39811 Subject: LU-4801 ldlm: discard l_lock from struct ldlm_lock. Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: c634dbeb9e576574a903f83dfb9cf39cf8d5468b

            Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/38238/
            Subject: Revert "LU-4801 ldlm: discard l_lock from struct ldlm_lock."
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 9051844cec34ab4f3427adc28bc1948706f5ffc2

            gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/38238/ Subject: Revert " LU-4801 ldlm: discard l_lock from struct ldlm_lock." Project: fs/lustre-release Branch: master Current Patch Set: Commit: 9051844cec34ab4f3427adc28bc1948706f5ffc2

            Oleg Drokin (green@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/38238
            Subject: Revert "LU-4801 ldlm: discard l_lock from struct ldlm_lock."
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 32095b5717954fa7260c9d6e369a208395bc39da

            gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/38238 Subject: Revert " LU-4801 ldlm: discard l_lock from struct ldlm_lock." Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 32095b5717954fa7260c9d6e369a208395bc39da

            Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/35483/
            Subject: LU-4801 ldlm: discard l_lock from struct ldlm_lock.
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 0584eb73dbb5b4c710a8c7eb1553ed5dad0c18d8

            gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/35483/ Subject: LU-4801 ldlm: discard l_lock from struct ldlm_lock. Project: fs/lustre-release Branch: master Current Patch Set: Commit: 0584eb73dbb5b4c710a8c7eb1553ed5dad0c18d8

            James Simmons (jsimmons@infradead.org) uploaded a new patch: https://review.whamcloud.com/35484
            Subject: LU-4801 ldlm: don't access l_resource when not locked.
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 5ea026bb3eb9020233569659189850519bc99a17

            gerrit Gerrit Updater added a comment - James Simmons (jsimmons@infradead.org) uploaded a new patch: https://review.whamcloud.com/35484 Subject: LU-4801 ldlm: don't access l_resource when not locked. Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 5ea026bb3eb9020233569659189850519bc99a17

            James Simmons (jsimmons@infradead.org) uploaded a new patch: https://review.whamcloud.com/35483
            Subject: LU-4801 ldlm: discard l_lock from struct ldlm_lock.
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: c7e16e62306abdb62f1039957573400c9114ea3f

            gerrit Gerrit Updater added a comment - James Simmons (jsimmons@infradead.org) uploaded a new patch: https://review.whamcloud.com/35483 Subject: LU-4801 ldlm: discard l_lock from struct ldlm_lock. Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: c7e16e62306abdb62f1039957573400c9114ea3f

            Neil pushed some patches to address. I will push

            simmonsja James A Simmons added a comment - Neil pushed some patches to address. I will push

            Oleg, it may not be right away, but we'll get this scheduled for testing.

            nedbass Ned Bass (Inactive) added a comment - Oleg, it may not be right away, but we'll get this scheduled for testing.

            People

              green Oleg Drokin
              nedbass Ned Bass (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: