[LU-15829] DIO small reads fails Created: 06/May/22 Updated: 31/Oct/22 Resolved: 12/Sep/22 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.15.0 |
| Fix Version/s: | Lustre 2.16.0 |
| Type: | Bug | Priority: | Major |
| Reporter: | Shaun Tancheff | Assignee: | Shaun Tancheff |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
| Severity: | 3 |
| Rank (Obsolete): | 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]$ |
| Comments |
| Comment by Gerrit Updater [ 06/May/22 ] |
|
"Shaun Tancheff <shaun.tancheff@hpe.com>" uploaded a new patch: https://review.whamcloud.com/47225 |
| Comment by Gerrit Updater [ 19/May/22 ] |
|
"Alexey Lyashkov <alexey.lyashkov@hpe.com>" uploaded a new patch: https://review.whamcloud.com/47395 |
| Comment by Peter Jones [ 12/Sep/22 ] |
|
Landed for 2.16 |