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

Check whether the page is currently under I/O in ->releasepage

Details

    • Bug
    • Resolution: Unresolved
    • Minor
    • None
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      We use seqlock to check if a page has been deleted on this inode during the fault process, allowing us to catch an erroneous short read or EIO.

      But after the newer kernels (such as Ubuntu 2204) introduces mapping->invalidate_lock, we could get rid of all these seqlock checks (which may have impact on the performance) for the newer kernel.
      One blocking is that invalidate_mapping_pages() is called in the kernel without holding this invalidate_lock. The reason is that the newer kernel thought that this function only release pages that are not in use or under I/O.

      Thus we need to check whether the current page trying to release is under I/O or not.
      we can use LCC ((ll_cl_context) to check in ->releasepage() that whether the current page is under I/O (read path) and belong one read context of a process. we can release the page only when the page is not under I/O or in use.
      Or a more coarse grain solution, we can account for an inode the number of processes doing read() and fault(): increase this value when call ll_lcc_add and decrease it when remove the LCC. if this count is larger than 1, we could not release the page...

      Attachments

        Activity

          [LU-16665] Check whether the page is currently under I/O in ->releasepage

          "Qian Yingjin <qian@ddn.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/50423
          Subject: LU-16665 llite: remove lli_page_inv_lock in newer kernel
          Project: fs/lustre-release
          Branch: master
          Current Patch Set: 1
          Commit: 386f68d03565c58e2cfc67971698892cbd81612e

          gerrit Gerrit Updater added a comment - "Qian Yingjin <qian@ddn.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/50423 Subject: LU-16665 llite: remove lli_page_inv_lock in newer kernel Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 386f68d03565c58e2cfc67971698892cbd81612e

          "Qian Yingjin <qian@ddn.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/50407
          Subject: LU-16665 llite: check whether page under I/O in releasepage()
          Project: fs/lustre-release
          Branch: master
          Current Patch Set: 1
          Commit: 889f5797e1a51859ad922eeca52c2905144d263b

          gerrit Gerrit Updater added a comment - "Qian Yingjin <qian@ddn.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/50407 Subject: LU-16665 llite: check whether page under I/O in releasepage() Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 889f5797e1a51859ad922eeca52c2905144d263b

          People

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

            Dates

              Created:
              Updated: