Re: [PATCH] Reduce the amount of WriteFile() syscalls when writing to buffered files

2017-08-26 Thread Ivan Zhakov
On 23 August 2017 at 19:47, Evgeny Kotkov wrote: > Evgeny Kotkov writes: > >> In the meanwhile, apparently, there is an oversight in the core V1 patch >> (3-reduce-syscalls-for-buffered-writes-v1.patch.txt): >> >> If the buffer is not empty, and the caller issues a write with a chunk >> that slig

Re: [PATCH] Reduce the amount of WriteFile() syscalls when writing to buffered files

2017-08-26 Thread Ivan Zhakov
On 21 August 2017 at 18:45, Evgeny Kotkov wrote: > Hi everyone, > [..] > The implementation is split into three dependent patches. The first two > patches lay the necessary groundwork by factoring out a couple of helper > functions. Refactoring patches committed in r1806299 and r1806301. > The

Re: [PATCH] Reduce the amount of WriteFile() syscalls when writing to buffered files

2017-08-23 Thread Evgeny Kotkov
Evgeny Kotkov writes: > In the meanwhile, apparently, there is an oversight in the core V1 patch > (3-reduce-syscalls-for-buffered-writes-v1.patch.txt): > > If the buffer is not empty, and the caller issues a write with a chunk > that slightly exceeds the buffer size, for example, 4100 bytes, it

Re: [PATCH] Reduce the amount of WriteFile() syscalls when writing to buffered files

2017-08-22 Thread Evgeny Kotkov
Markus Schaber writes: > Hi, Evgeny, > > Great work, IMHO. Thank you :-) >> This patch series reduces the amount of syscalls in such situations by >> performing a single WriteFile() call without any buffering, if possible. >> If some data is already buffered, then the buffer is first filled, fl

RE: [PATCH] Reduce the amount of WriteFile() syscalls when writing to buffered files

2017-08-21 Thread Markus Schaber
Hi, Evgeny, Great work, IMHO. From: Evgeny Kotkov [mailto:evgeny.kot...@visualsvn.com] > This patch series reduces the amount of syscalls in such situations by > performing a single WriteFile() call without any buffering, if possible. > If some data is already buffered, then the buffer is first

[PATCH] Reduce the amount of WriteFile() syscalls when writing to buffered files

2017-08-21 Thread Evgeny Kotkov
Hi everyone, Currently, apr_file_write() can cause an excessive amount of syscalls for buffered files on Windows in some situations. This happens because for buffered files, writing is implemented with a loop that keeps copying the data to the internal 4KB buffer and writing the contents of this