Remove test in pipe_write() which causes write(2) to return EAGAIN
on a non-blocking pipe in cases where select(2) returns the file descriptor as ready for write. This in turns causes libc_r, for one, to busy wait in such cases. Note: it is a quick performance fix, a more complex fix might be required in case this turns out to have unexpected side effects. Reviewed by: silby MFC after: 3 days
This commit is contained in:
parent
cc2185305b
commit
ae9fcf4c66
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=118230
@ -1041,7 +1041,7 @@ pipe_write(fp, uio, active_cred, flags, td)
|
||||
if ((space < uio->uio_resid) && (orig_resid <= PIPE_BUF))
|
||||
space = 0;
|
||||
|
||||
if (space > 0 && (wpipe->pipe_buffer.cnt < PIPE_SIZE)) {
|
||||
if (space > 0) {
|
||||
if ((error = pipelock(wpipe,1)) == 0) {
|
||||
int size; /* Transfer size */
|
||||
int segsize; /* first segment to transfer */
|
||||
|
Loading…
Reference in New Issue
Block a user