[PATCH 4/4] posix: Implement preadv2 and pwritev2
Adhemerval Zanella
adhemerval.zanella@linaro.org
Fri Apr 28 13:58:00 GMT 2017
On 27/04/2017 19:30, Joseph Myers wrote:
> On Thu, 27 Apr 2017, Adhemerval Zanella wrote:
>
>> The Linux one uses the preadv2/pwritev2 syscall if defined, otherwise it
>> call preadv/writev. Instead of using the previous __ASSUME_* to
>> unconditionally issue the syscall (and avoid building the fallback routine),
>> it call pread/write if the preadv2/pwritev2 syscalls fails. The idea
>> is just avoid adding another __ASSUME_* and checking each architecture
>> on every kernel bump and simplify code conditionals.
>
> I think we should have the __ASSUME_*; it's how we track when code can be
> removed after an increase to the minimum supported kernel version (unless
> you have some other way of the community tracking code that will become
> obsolete after such a change).
My objection to __ASSUME_* is it adds more different possible build modes
which won't get actively tested unless you explicit adds a minimum kernel
option on build time. And which different __ASSUME_* enabled by different
kernel version it would require different build with multiple different
enabled minimum kernel version to get all the coverage to check for all
permutations. I think we can add an explicit comment and keep track based
on this, since with minimum kernel increase it will be eventually dead code.
>
> What's the rationale for missing documentation for these functions? That
> preadv and pwritev are also missing documentation?
>
None, it was a overlook from my part. I will add the documentation and resend
the patch.
More information about the Libc-alpha
mailing list