最佳答案
In scatter and gather (i.e. readv
and writev
), Linux reads into multiple buffers and writes from multiple buffers.
If say, I have a vector of 3 buffers, I can use readv
, OR I can use a single buffer, which is of combined size of 3 buffers and do fread
.
Hence, I am confused: For which cases should scatter/gather be used and when should a single large buffer be used?