commit | cf9c7d2382eadc5699d3e4032b3e1774eccc36da | [log] [tgz] |
---|---|---|
author | H. Peter Anvin <hpa@zytor.com> | Mon Feb 01 02:39:07 2016 -0800 |
committer | H. Peter Anvin <hpa@zytor.com> | Mon Feb 01 02:41:00 2016 -0800 |
tree | 5ffd6e3c9e8f0995c09adcdc74e8a936508fad07 | |
parent | 17fabd540aeb5019909a024243c6d26610cab307 [diff] |
[klibc] fwrite: flush before a large write to allow better bypass If we are doing a large write, flush the buffer preemptively, so we don't end up double-buffering a sequence of BUFSIZ writes simply because we started out with something in the buffer. This doesn't increase the number of system calls, since we will always need to do two system calls in this case. Signed-off-by: H. Peter Anvin <hpa@zytor.com>