File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -186,16 +186,10 @@ class S3FileIoOptions:
186186 """
187187 Enable direct IO to bypass the OS cache. Helpful when the disk I/O outperforms the kernel cache.
188188
189- - Currently only Linux supports direct I/O. On unsupported platforms, the request transparently
190- falls back to buffered I/O and a warning is logged.
191- - Supported for both upload (send_filepath) and download (recv_filepath).
192- - For upload, part_size MUST be page-aligned when direct_io is enabled (hard fail otherwise).
193- The client controls part_size and is responsible for ensuring alignment.
194- - For download, this is a best-effort optimization. The request transparently falls back to
195- buffered I/O (logging a warning) if any of the following preconditions are not met:
196- part_size is not page-aligned, recv_file_position is not page-aligned (WRITE_TO_POSITION),
197- existing file size is not page-aligned (CREATE_OR_APPEND), or the last part has an
198- unaligned length (only that part falls back).
189+ - This is a BEST-EFFORT optimization. The request transparently falls back to
190+ buffered I/O (logging a warning) on unsupported platforms or when alignment
191+ preconditions are not met (part_size not page-aligned, last part has unaligned
192+ length, etc).
199193 - Check NOTES for O_DIRECT for additional info https://man7.org/linux/man-pages/man2/openat.2.html
200194
201195 In summary, O_DIRECT is a potentially powerful tool that should be used with caution.
You can’t perform that action at this time.
0 commit comments