Skip to content

Conversation

@portante
Copy link
Contributor

@portante portante commented Sep 29, 2025

The use of the sequential write() system calls to replace writev() in commit 29d17be might be simpler to understand, but can lead to unwanted CPU overhead when a high frequency of newlines exists in the data. The original bugfix for the log file corruption was the proper reset of the iovcnt on error. We restore the reset but always do it as part of the writev_buffer_flush() method which avoids "leaking" knowledge of how it works.

See #262 for the effects that behavioral analysis.

The use of the sequential `write()` system calls to replace `writev()` in commit
29d17be might be simpler to understand, but can lead to unwanted CPU overhead
when a high frequency of newlines exists in the data.  The original bugfix for
the log file corruption was the proper reset of the `iovcnt` on error.  We
restore the reset but always do it as part of the `writev_buffer_flush()` method
which avoids "leaking" knowledge of how it works.

Signed-off-by: Peter Portante <peter.portante@redhat.com>
@portante portante marked this pull request as ready for review October 7, 2025 02:11
Adding `systemd-devel` for Fedora derivatives.

Signed-off-by: Peter Portante <peter.portante@redhat.com>
@jnovy
Copy link
Collaborator

jnovy commented Oct 7, 2025

LGTM, the README.md can be further amended in the following commit. Integration errors are not related to this PR.

@jnovy jnovy merged commit 30a196a into containers:main Oct 7, 2025
34 of 35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants