Re: Adding read_exact and write_all OPs?

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

 



Hi Jens,

In application code it's quite common to write/read a whole buffer and
only then continue task execution. The traditional approach is to wrap
read/write sycall/OP in loop, which is often done as part of a
language std. In synchronous context it makes sense because it allows
to process things like EINTR. But in asynchronous (event-driven)
context I think it makes a bit less sense.

What do you think about potential addition of OPs like read_exact and
write_all, i.e. OPs which on successful CQE guarantee that an input
buffer was processed completely? They would allow to simplify user
code and in some cases to significantly reduce ring traffic.

That may make sense, and there's some precedence there for sockets with
the WAITALL flags.

I remember we got short reads/writes from some early kernel versions
and had to add a retry in samba.

But don't we already have a retry in current kernels?
At least for the need_complete_io() case?
io_rw_should_reissue() also seem to be related and also handles S_ISREG,
but it's hidden behind CONFIG_BLOCK.

Are there really systems without CONFIG_BLOCK?

metze




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux