Details

    • Technical task
    • Resolution: Fixed
    • Minor
    • Lustre 2.13.0
    • None
    • None
    • 9223372036854775807

    Description

      PCC uses the layout lock to protect the cache validity. Currently PCC only supports auto attach at the next open. However, the layout lock can be revoked at any time by LRU/manual lock shrinking or lock conflict callback.

      For example, the layout lock can be revoked when perform I/Os after open the file. At this time, the cached file will be detached involuntary. The I/O originally directed into PCC will redirect to OSTs after the data restore into OSTs' objects. This cost of this unwilling behavior may be expensive.

      To avoid this problem, it is necessary to implement auto attach for PCC even during IOs (not only at the open time).

      And auto attach should be enabled by default.

      Attachments

        Activity

          [LU-12526] Auto attach for PCC during IO
          pjones Peter Jones added a comment -

          Landed for 2.13

          pjones Peter Jones added a comment - Landed for 2.13

          Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/36005/
          Subject: LU-12526 pcc: Auto attach for PCC during IO
          Project: fs/lustre-release
          Branch: master
          Current Patch Set:
          Commit: a120bb13525727654713f008ffcaf0e3aec7cb65

          gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/36005/ Subject: LU-12526 pcc: Auto attach for PCC during IO Project: fs/lustre-release Branch: master Current Patch Set: Commit: a120bb13525727654713f008ffcaf0e3aec7cb65

          Yingjin Qian (qian@ddn.com) uploaded a new patch: https://review.whamcloud.com/36005
          Subject: LU-12526 pcc: Auto attach for PCC during IO
          Project: fs/lustre-release
          Branch: master
          Current Patch Set: 1
          Commit: 5a87571254c5ed4515a5971a583a5c90502980a5

          gerrit Gerrit Updater added a comment - Yingjin Qian (qian@ddn.com) uploaded a new patch: https://review.whamcloud.com/36005 Subject: LU-12526 pcc: Auto attach for PCC during IO Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 5a87571254c5ed4515a5971a583a5c90502980a5

          Hi Patrick,

          Implementing attach during IO is not very hard, please see the patch above.

          qian_wc Qian Yingjin added a comment - Hi Patrick, Implementing attach during IO is not very hard, please see the patch above.

          Yingjin Qian (qian@ddn.com) uploaded a new patch: https://review.whamcloud.com/35468
          Subject: LU-12526 pcc: Auto attach for PCC during IO
          Project: fs/lustre-release
          Branch: pcc
          Current Patch Set: 1
          Commit: 5c969003b6899f2449095f321715cad1b1d98918

          gerrit Gerrit Updater added a comment - Yingjin Qian (qian@ddn.com) uploaded a new patch: https://review.whamcloud.com/35468 Subject: LU-12526 pcc: Auto attach for PCC during IO Project: fs/lustre-release Branch: pcc Current Patch Set: 1 Commit: 5c969003b6899f2449095f321715cad1b1d98918

          Hmm, but I'm basically just suggesting you hold it during I/O.  Not all the time.  If you're doing I/O to a file, it's not unreasonable to have a lock on it nor is it wasteful of memory.

          In order to do I/O in the normal Lustre path, you have to take the layout lock for read before doing I/O.  You don't hold it across the I/O (and you can't do so safely because your I/O might cause layout changes, requiring the lock).  But PCC doesn't cause those kinds of layout changes (which are FLR/PFL layout updates, basically), I think?

          So you could take the layout lock for read before I/O, and hold it across I/O.  If the other bits conflict, then the lock will be cancelled once your I/O is over, and you will ask for a new lock on the next I/O, with just the layout bit in it.  You will have to be careful about it, but it seems simpler than implementing attach during I/O.

          Maybe I am wrong - I can't see how attach during I/O would work, but I assume you have a plan.  Perhaps it is simpler than it sounds?

          pfarrell Patrick Farrell (Inactive) added a comment - - edited Hmm, but I'm basically just suggesting you hold it during I/O.  Not all the time.  If you're doing I/O to a file, it's not unreasonable to have a lock on it nor is it wasteful of memory. In order to do I/O in the normal Lustre path, you have to take the layout lock for read before doing I/O.  You don't hold it across the I/O (and you can't do so safely because your I/O might cause layout changes, requiring the lock).  But PCC doesn't cause those kinds of layout changes (which are FLR/PFL layout updates, basically), I think? So you could take the layout lock for read before I/O, and hold it across I/O.  If the other bits conflict, then the lock will be cancelled once your I/O is over, and you will ask for a new lock on the next I/O, with just the layout bit in it.  You will have to be careful about it, but it seems simpler than implementing attach during I/O. Maybe I am wrong - I can't see how attach during I/O would work, but I assume you have a plan.  Perhaps it is simpler than it sounds?
          qian_wc Qian Yingjin added a comment -

          And Current problem is that many other ibits locks (PERM and UPDATE) are binding with the layout lock. The can cancellation of other ibits lock may revoke the layout lock also.

          qian_wc Qian Yingjin added a comment - And Current problem is that many other ibits locks (PERM and UPDATE) are binding with the layout lock. The can cancellation of other ibits lock may revoke the layout lock also.
          qian_wc Qian Yingjin added a comment -

          Currently the layout locks are maintained in a LRU way. They can be shrinking at any time according to the client or server lock load...

           If keep holding the layout lock during I/O like the lease lock (not in lock LRU list),  even only for PCC case, it may cause many locks caching on the clients and servers, which will result in memory pressure.

          qian_wc Qian Yingjin added a comment - Currently the layout locks are maintained in a LRU way. They can be shrinking at any time according to the client or server lock load...  If keep holding the layout lock during I/O like the lease lock (not in lock LRU list),  even only for PCC case, it may cause many locks caching on the clients and servers, which will result in memory pressure.

          I thought Oleg's suggestion was for the PCC case to hold the layout lock during I/O - Is that not practical?

          pfarrell Patrick Farrell (Inactive) added a comment - I thought Oleg's suggestion was for the PCC case to hold the layout lock during I/O - Is that not practical?

          People

            qian_wc Qian Yingjin
            qian_wc Qian Yingjin
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: