1. 04 Sep, 2024 2 commits
  2. 03 Sep, 2024 1 commit
  3. 29 Aug, 2024 2 commits
  4. 28 Aug, 2024 3 commits
    • Han-Wen Nienhuys's avatar
      fs: reorganize code · 4df83d57
      Han-Wen Nienhuys authored
      Change-Id: I91a375cc2956b2ead0ad3a4a5b2a0c66a4c327e2
      4df83d57
    • Han-Wen Nienhuys's avatar
      fs: support passthrough mode · e0a0b09a
      Han-Wen Nienhuys authored
      If a returned file implements the FilePassthroughFder interface, we
      try to register the file in the kernel.
      
      Implement this for loopbackFile, and test the behavior.
      
      For benchmarking, use a single reader. With multiple readers, contents
      are served out of kernel cache, and do not reflect FUSE performance. 
      
      Benchmark (CPU i5-8350U pinned at 2Ghz):
      
      $ go build -v && go test -run "abc" -bench '(Libfuse|FD)' --passthrough_hp ~/vc/libfuse/build/example/passthrough_hp -test.cpu=1
      BenchmarkGoFuseFDRead 	   27444	     45997 ns/op	1424.80 MB/s	      87 B/op	       1 allocs/op
      BenchmarkLibfuseHP    	   35377	     32198 ns/op	2035.43 MB/s	       0 B/op	       0 allocs/op
      
      $ go build -v && sudo go test -run "abc" -bench '(Libfuse|FD)' --passthrough_hp ~/vc/libfuse/build/example/passthrough_hp -test.cpu=1
      BenchmarkGoFuseFDRead 	   91788	     11902 ns/op	5506.23 MB/s	       3 B/op	       0 allocs/op
      BenchmarkLibfuseHP    	  100556	     11831 ns/op	5539.38 MB/s	       0 B/op	       0 allocs/op
      
      Change-Id: If8bde502a3450028f4d87ba61fa9c76ea3ea6c63
      e0a0b09a
    • Han-Wen Nienhuys's avatar
      fuse: expose BackingFdMap · ff286a50
      Han-Wen Nienhuys authored
      This prepares for extension to the passthrough support, in particular,
      the ops_mask to be added to `struct fuse_backing_map`.
      
      Change-Id: If4d7c321a5d09e9b2a3b804bd5e434aab394fe30
      ff286a50
  5. 27 Aug, 2024 2 commits
  6. 25 Aug, 2024 10 commits
    • Han-Wen Nienhuys's avatar
      fuse: print tweaks for passthrough support · 549c0c90
      Han-Wen Nienhuys authored
      Change-Id: I513d6344ff0d22649c240bbf31ef901dca70f4e2
      549c0c90
    • Han-Wen Nienhuys's avatar
      fs: return fileEntry from registerFile and addNewChild · f0fd3eaf
      Han-Wen Nienhuys authored
      Also create a fresh fileEntry even if we reuse the file handle number.
      
      Change-Id: Ic3f37f8ad6d916f84b0dbcb8268f195161aac4ad
      f0fd3eaf
    • Han-Wen Nienhuys's avatar
      benchmark: add a test reading from libfuse passthrough_hp · 2caa7fd4
      Han-Wen Nienhuys authored
      passthrough_hp is the high-performance loopback filesystem. By
      exercising it, we can distinguish between kernel bugs (shared between
      go-fuse and libfuse) and go-fuse bugs.
      
      Passthrough mode does not work with iflag=direct, because
      passthrough_hp does not check if the file is marked "directio",
      assuming read() calls in passthrough mode are some kind of error.
      
      Change-Id: I2b6b4c943031e1a2864e15e5bf396aac28c63e31
      2caa7fd4
    • Han-Wen Nienhuys's avatar
      benchmark: modernize setupFS · 50cd8164
      Han-Wen Nienhuys authored
      Change-Id: I0dd07cf43fded2aa28ff83b2797e9222ae6e1295
      50cd8164
    • Han-Wen Nienhuys's avatar
      benchmark: introduce benchmark for loopback reads · ab014071
      Han-Wen Nienhuys authored
      Loopback (file backed by some other file on disk) is an important
      use-case, and FUSE features such as passthrough and splicing aim to
      reduce overhead.
      
      Example: 
      
          Splice disabled:
      
          $ go test -bench FD -test.cpu=1,2
          goos: linux
          goarch: amd64
          pkg: github.com/hanwen/go-fuse/v2/benchmark
          cpu: Intel(R) Core(TM) i5-8350U CPU @ 1.70GHz
          BenchmarkGoFuseFDRead     	    1929	    597942 ns/op	3507.28 MB/s	    4290 B/op	     129 allocs/op
          BenchmarkGoFuseFDRead-2   	    2497	    421856 ns/op	4971.26 MB/s	   62500 B/op	     177 allocs/op
          PASS
          ok  	github.com/hanwen/go-fuse/v2/benchmark	3.510s
      
          Splice enabled:
      
          $ go test -bench FD -test.cpu=1,2
          goos: linux
          goarch: amd64
          pkg: github.com/hanwen/go-fuse/v2/benchmark
          cpu: Intel(R) Core(TM) i5-8350U CPU @ 1.70GHz
          BenchmarkGoFuseFDRead     	    1524	    750249 ns/op	2795.28 MB/s	    4132 B/op	      98 allocs/op
          BenchmarkGoFuseFDRead-2   	    2364	    463522 ns/op	4524.39 MB/s	   11719 B/op	     106 allocs/op
          PASS
      
      in other words, the API complexity that splicing introduced was not
      worth it: it actually slows down things.
      
      Change-Id: I4f7519ab2cc5b0145d0f7f81f55ad20d544e9d87
      ab014071
    • Han-Wen Nienhuys's avatar
      benchmark: simplify ReadLines · 6a08a74a
      Han-Wen Nienhuys authored
      Change-Id: I683c0f614f67e787229d0754354a25f225184995
      6a08a74a
    • Han-Wen Nienhuys's avatar
      fs: fix stray comment · a8693e36
      Han-Wen Nienhuys authored
      Change-Id: Iad80862a8d13cb03511a005d385735594ff5e353
      a8693e36
    • Han-Wen Nienhuys's avatar
      fuse: wire up passthrough support · e0641a46
      Han-Wen Nienhuys authored
      The passthrough feature lets a filesystem register an open file
      descriptor with the kernel to avoid roundtrips for read/write
      operations.
      
      Change-Id: Ia8bde502a3450028f4d87ba61fa9c76ea3ea6c63
      e0641a46
    • Han-Wen Nienhuys's avatar
      fuse: point comment to fs API rather than nodefs/pathfs · 1224fbcf
      Han-Wen Nienhuys authored
      Change-Id: I18bde502a3450028f4d87ba61fa9c76ea3ea6c63
      1224fbcf
    • Han-Wen Nienhuys's avatar
      fuse: move Flags2 handling to platform specific code · d7570e24
      Han-Wen Nienhuys authored
      Document why some bits are platform dependent.
      
      Change-Id: Ib8bde502a3450028f4d87ba61fa9c76ea3ea6c63
      d7570e24
  7. 23 Aug, 2024 3 commits
  8. 16 Aug, 2024 1 commit
  9. 15 Aug, 2024 3 commits
  10. 28 May, 2024 2 commits
  11. 18 May, 2024 2 commits
  12. 15 May, 2024 4 commits
  13. 12 May, 2024 1 commit
  14. 01 May, 2024 2 commits
  15. 30 Apr, 2024 1 commit
  16. 21 Apr, 2024 1 commit
    • lch's avatar
      posixtest: fix building of tests · 8d89f3cd
      lch authored
      Prefer x/sys/unix over syscall package, which supports FreeBSD.
      
      Change-Id: Ifd3a0fd6d2b90369a6e1e74d92606a655815a6a4
      8d89f3cd