Regression for mmap writes through FUSE in 4.2+

From: Jakob Unterwurzacher
Date: Fri Jan 22 2016 - 16:11:10 EST


I have noticed an annoying regression that was introduced in 4.2 and is
still there in 4.4. mmap writes to FUSE filesystems are throttled down
to basically zero.

Reproducer: https://github.com/rfjakob/mmapwrite , testing against encfs:

$ mmapwrite /tmp/encfs-mnt/foo
1 .................................................. 107.01 MB/s
2 .................................................. 101.98 MB/s
[...]
68 .................................................. 106.79 MB/s
69 .................................................. 105.09 MB/s
70 .................................................. 2.02 MB/s
71 .................................................. 1.77 MB/s
72 .................................................. 0.42 MB/s
73 .................................... (hangs)

I have tested kernels from 4.0 and this seems to have been introduced in
4.2:

4.0 ....... 140MB/s permanent
4.1 ....... 140MB/s permanent
4.2 ....... 100MB/s at the start, sudden slowdown to 1MB/s after ~5GB
4.3 ....... 100MB/s at the start, sudden slowdown to 1MB/s after ~1.5GB
4.4-rc4 ... 100MB/s at the start, slowly ramps down, 0.3MB/s after ~2GB
4.4 ....... 100MB/s at the start, sudden slowdown after ~3GB

Is there a way to disable the throttling? Or at least exempt FUSE until
there is a proper fix?

Thanks,
Jakob