8 ms·
> The kernel can map that data in dynamically much faster than a userland process can. Not necessarily. The kernel's mmap implementation has quite a strong bia
by PaulDavisThe1st 6mo ago
> The kernel can map that data in dynamically much faster than a userland process can.
Not necessarily. The kernel's mmap implementation has quite a strong bias towards certains kinds of access patterns; deviate from them and it can become slower than read(2).
We tried using mmap(2) for audio file i/o in Ardour, and it got notably less bandwidth than just using read(2).
- debatem1 6mo agoI'm curious if you tried different madvise strategies and if any of them worked better than others?
- PaulDavisThe1st 6mo agoI don't recall - it was several years ago. But glancing through what is left of the test program, it seems likely that we did not.