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

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

    XMLWordPrintable

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

          People

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

            Dates

              Created:
              Updated: