prefetch: remove read size, always request maximum
Well behaving streams only wait for some data to be available (e.g. FTP, HTTP, raw TCP). Poory behaving streams wait for the whole requested amount (e.g. regular file - though it does not use prefetch anyway). Badly behaving streams wait for the whole requested amount and do not perform any pipelining/buffering (e.g. CIFS, probably SFTP). In the best case, this change reduces the number of calls, thus slightly improving performance. In the worst case, it reduces the number of round-trips necessary, thus restoring support for playback at bandwidth-latency product. However it increases latency in the low bandwidth case, but there is a simple work-around: capping the read size to a suitably small value. Another work-around which works both ways is to provide pf_block rather than pf_read. But it incurs an extra memory copy.
Showing
Please register or sign in to comment