Actions
Bug #2470
closed[PATCH] network_write_chunkqueue_writev repeatedly calls sysctl to look up iov_max
ASK QUESTIONS IN Forums:
Description
On systems with sysconf(_SC_IOV_MAX), network_write_chunkqueue_writev prefers that over other options. On FreeBSD, sysconf is implemented by doing a sysctl lookup of kern.iov_max each time it's called. This has the full weight of a syscall, and is happening once every time through the for() loop.
The patch below checks the max_chunks value only once and remembers it, cutting the number of syscalls network_write_chunkqueue_writev makes in half. Also changes the error message if no way of looking up max_chunks is found to file a bug here instead of annoying Jan by email.
Files
Updated by stbuehler over 11 years ago
- Status changed from New to Fixed
- % Done changed from 0 to 100
Applied in changeset r2885.
Actions
Also available in: Atom