+ /*
+ * Give hints to the kernel about how we access the file:
+ * POSIX_FADV_DONTNEED : we won't re-access data in a near
+ * future after we write it.
+ * We need to call fadvise again after the file grows because
+ * the kernel does not seem to apply fadvise to non-existing
+ * parts of the file.
+ * Call fadvise _after_ having waited for the page writeback to
+ * complete because the dirty page writeback semantic is not
+ * well defined. So it can be expected to lead to lower
+ * throughput in streaming.
+ */
+ posix_fadvise(outfd, orig_offset - pair->max_sb_size,
+ pair->max_sb_size, POSIX_FADV_DONTNEED);
+ }
+