Re: [PATCH 2/3] fs: add STATX_DIO_READ_ALIGN

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 28, 2024 at 11:52:27PM +0000, Eric Biggers wrote:
> Thanks.  We maybe should have included read/write separation in STATX_DIOALIGN,
> but at the time the only case that was brought up was "DIO reads are supported
> but DIO writes are not" which people had argued was not useful.
> 
> Is this patch meant to support that case,

Why would anyone support direct I/O reads but not writes?  That seems
really weird, but maybe I'm missing something important.

> or just the case where DIO in both
> directions is supported but with different alignments?  Is that different file
> offset alignments, different memory alignments, or both?  This patch doesn't add
> a stx_dio_read_mem_align field, so it's still assumed that both directions share
> the existing stx_dio_mem_align property, including whether DIO is supported at
> all (0 vs. nonzero).

Yes.  The memory alignment really is dependent on the underlying storage
hardware DMA engine, which doesn't distinguish between reads and writes.

> So as proposed, the only case it helps with is where DIO
> in both directions is supported with the same memory alignment but different
> file offset alignments.

Yes.

> Maybe that is intended, but it's not clear to me.

Well, that's good feedback to make it more clear.

> Are there specific userspace applications that would like to take advantage of a
> smaller value of stx_dio_read_offset_align compared to the existing
> stx_dio_offset_align?

There are a lot of read-heavy workloads where smaller reads do make
a difference.





[Index of Archives]     [Linux Filesystem Development]     [Linux BTRFS]     [Linux CIFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux