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

Allow reusing of write openhandle for reads

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • None
    • Lustre 2.13.0
    • None
    • 9223372036854775807

    Description

      Currently when openlock cahe is used we distinguish 3 kinds of opens: WRITE, READ and EXEC. the O_RDWR mode is counted as WRITE.

      READ mode is compatible with either EXEC or WRITE, but EXEC and WRITE are incompatible between themselves.

      Give that there's a relatively common workload of open file for write ; write into file ; close ; open file for read.; read ; close is typical - it's an interesting idea to combine WRITE and READ handles at least somewhat.

      In absence of EXEC mode they are pretty much the same (when obtained in WRITE ; READ order). Exec of course makes it somewhat tricky since as long as we hold the write lock, we cannot do open for exec.

      Possible idea to tackle this:
      When we have the WRITE openlock (and handle) and we want to open it for READ we can just detect the CW lock (guaranteeing the file did not get anywhere as well - important from correctness perspective!) and reuse the handle.

      Should we get a blocking ast on the CW lock (or perhaps even before? or as a lock/mode convert downgrade op (obviously it's a protocol change so more involved)?) - we would first send and acquire a read handle (and lock) and then release the CW lock and WRITE handle allowing us continuity in operations.

      Attachments

        Activity

          People

            wc-triage WC Triage
            green Oleg Drokin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: