On Wed, 3 Apr 2024 10:04:36 GMT, Alan Bateman <al...@openjdk.org> wrote:

> This change drops the adjustments to the virtual thread scheduler's target 
> parallelism when virtual threads do file operations on files that are opened 
> for buffered I/O. These operations are usually just too short to have any 
> benefit and may have a negative benefit when reading/writing a small number 
> of bytes.

What I understand of these changes overall is that, we no longer consider most 
of the file operations that work against an actual file as needing to be 
compensated by the ForkJoinPool. It doesn't matter even if the read() is being 
done with a large buffer - we still consider it an operation that doesn't 
deserve a compensation. 

The only file operations where we do appear to compensate is certain `write` 
operations which are backed by `O_SYNC`, `O_DSYNC` or direct IO writes.

The places where `FileOutputStream` is used against a file descriptor which 
isn't a file have been update to continue to using the `Blocker` to potentially 
compensate the operations.

Overall, based on my limited knowledge of this area, the changes look OK to me. 
There are a few questions I had which I've added inline. The copyright years on 
many of the files will need an update.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/18598#issuecomment-2045417779

Reply via email to