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

MAP_POPULATE hangs with Linux 5.4

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.14.0, Lustre 2.12.7
    • Lustre 2.14.0
    • None
    • 3
    • 9223372036854775807

    Description

      While testing Lustre with Linux 5.4 (kernel installed on top of Ubuntu 18.04), I came across an issue with mmap_cat test utility.

      In this program, the call to mmap is:

      mmappedData = mmap(NULL, filesize, PROT_READ, MAP_PRIVATE | MAP_POPULATE, fd, 0);
      

      When using mmap_cat on a file, it hangs. However, if the call to mmap is changed as following, it works:

      mmappedData = mmap(NULL, filesize, PROT_READ, MAP_PRIVATE, fd, 0);
      

      So it seems the bug is related to the MAP_POPULATE flag, which semantic is:

      MAP_POPULATE (since Linux 2.5.46)
                    Populate (prefault) page tables for a mapping.  For a file
                    mapping, this causes read-ahead on the file.  This will help
                    to reduce blocking on page faults later.  MAP_POPULATE is sup‐
                    ported for private mappings only since Linux 2.6.23.
      

      Attachments

        Issue Links

          Activity

            People

              green Oleg Drokin
              sebastien Sebastien Buisson
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: