Cleanup #53682
open
common: use fmt::print for stderr logging
Added by 玮文 胡 over 2 years ago.
Updated 7 months ago.
Description
Reduce the number of syscalls to improve performance.
Also reduce the probability of https://tracker.ceph.com/issues/49551, since conmon is less likely to read partial log line.
Test shows that fmt::print is as performant as calling `writev` directly. And it is portable and safe in handling short write.
- Related to Bug #57923: log: writes to stderr (pipe) may not be atomic added
- Status changed from New to Pending Backport
- Target version set to v18.0.0
- Backport changed from pacific, octopus to quincy,pacific
- Copied to Backport #57925: pacific: common: use fmt::print for stderr logging added
- Copied to Backport #57926: quincy: common: use fmt::print for stderr logging added
- Tags set to backport_processed
Also available in: Atom
PDF