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

DIO small reads fails

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • Lustre 2.16.0
    • Lustre 2.15.0
    • None
    • 3
    • 9223372036854775807

    Description

      On Lustre there is one strange quirk:

      DIO writing now works, assuming you are writing from an aligned buffer, you are not restricted to the 512 byte limit.

      However DIO reading of a single byte is broken, reading for more than 1 byte is okay.

      Attached test source: dio_test.c

      [shaun@alma8 dio]$ /home/shaun/tools/dio/dio_test -w -d -b 1 /mnt/lustre/tmp/dio_w3.dat
      /mnt/lustre/tmp/dio_w3.dat - DIRECT WRITE 1/1 bytes
      [shaun@alma8 dio]$ /home/shaun/tools/dio/dio_test -d -b 1 /mnt/lustre/tmp/dio_w3.dat
      read: 0 (EOF)
      

      If the block you are reading 1 byte from is in the PAGE_CACHE then the 1 byte read will succeed.

      [shaun@alma8 dio]$ /home/shaun/tools/dio/dio_test -b 1 /mnt/lustre/tmp/dio_w3.dat
      read: 1, x'33  '
      /mnt/lustre/tmp/dio_w3.dat - BUFFER READ 1/1 bytes
      [shaun@alma8 dio]$ /home/shaun/tools/dio/dio_test -d -b 1 /mnt/lustre/tmp/dio_w3.dat
      read: 1, x'33  '
      /mnt/lustre/tmp/dio_w3.dat - DIRECT READ 1/1 bytes
      [shaun@alma8 dio]$ echo 3 | sudo tee /proc/sys/vm/drop_caches
      3
      [shaun@alma8 dio]$ /home/shaun/tools/dio/dio_test -d -b 1 /mnt/lustre/tmp/dio_w3.dat
      read: 0 (EOF)
      

      So what happens when doing a DIO read of 2 or more bytes and the block is NOT in the PAGE_CACHE?

      [shaun@alma8 dio]$ echo 3 | sudo tee /proc/sys/vm/drop_caches
      3
      [shaun@alma8 dio]$ /home/shaun/tools/dio/dio_test -d -b 1 /mnt/lustre/tmp/dio_w3.dat
      read: 0 (EOF)
      [shaun@alma8 dio]$ /home/shaun/tools/dio/dio_test -d -b 2 /mnt/lustre/tmp/dio_w3.dat
      read: 1, x'33  '
      read: 0 (EOF)
      /mnt/lustre/tmp/dio_w3.dat - DIRECT READ 1/2 bytes
      [shaun@alma8 dio]$ 
      

      Attachments

        Activity

          People

            stancheff Shaun Tancheff
            stancheff Shaun Tancheff
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: