Default FD buffer size is not a power of 2
-- We used to use System.Posix.Internals.dEFAULT_BUFFER_SIZE, which is -- taken from the value of BUFSIZ on the current platform. This value -- varies too much though: it is 512 on Windows, 1024 on OS X and 8192 -- on Linux. So let's just use a decent size on every platform: dEFAULT_FD_BUFFER_SIZE :: Int dEFAULT_FD_BUFFER_SIZE = 8096
8096 is not a power of two, and does not agree with the original commit message that sets it to 8KB (https://github.com/ghc/ghc/blame/master/libraries/base/GHC/IO/FD.hs\#L119).
Confirmed by Simon Marlow on IRC that this is a typo, a mix between 8192 and 4096.
I'll send a patch to set it to 8192.
It would be nice if the fix could be released in both GHC 8.2 and and 8.0.3.