opnsense-src/sys
Rick Macklem 867c27c23a nfscl: Change IO_APPEND writes to direct I/O
IO_APPEND writes have always been very slow over NFS, due to
the need to acquire an up to date file size after flushing
all writes to the NFS server.

This patch switches the IO_APPEND writes to use direct I/O,
bypassing the buffer cache.  As such, flushing of writes
normally only occurs when the open(..O_APPEND..) is done.
It does imply that all writes must be done synchronously
and must be committed to stable storage on the file server
(NFSWRITE_FILESYNC).

For a simple test program that does 10,000 IO_APPEND writes
in a loop, performance improved significantly with this patch.

For a UFS exported file system, the test ran 12x faster.
This drops to 3x faster when the open(2)/close(2) are done
for each loop iteration.
For a ZFS exported file system, the test ran 40% faster.

The much smaller improvement may have been because the ZFS
file system I tested against does not have a ZIL log and
does have "sync" enabled.

Note that IO_APPEND write performance is still much slower
than when done on local file systems.

Although this is a simple patch, it does result in a
significant semantics change, so I have given it a
large MFC time.

Tested by:	otis
MFC after:	3 months
2021-12-15 08:35:48 -08:00
..
amd64 Remove references to PCMCIA 2021-12-14 15:27:47 -07:00
arm Fix a set but not used warning in the arm GIC driver 2021-12-10 13:29:11 +00:00
arm64 rk_i2c_fill_tx: fixup previous commit 2021-12-15 13:21:16 +02:00
bsm Add fspacectl(2), vn_deallocate(9) and VOP_DEALLOCATE(9). 2021-08-05 23:20:42 +08:00
cam mmc_sim: fix setting of the mutex name 2021-12-15 13:42:02 +02:00
cddl Fix dtrace fbt return probes on arm64 2021-12-14 16:32:12 +00:00
compat Create wrapper for Giant taken for newbus 2021-12-09 17:04:45 -07:00
conf pccard: Remove more of the PC Card infrastructure 2021-12-14 15:27:47 -07:00
contrib ipfilter fil.c: Fix two typos in comments 2021-12-15 08:09:39 -08:00
crypto Add accelerated arm64 sha512 to libmd 2021-12-13 15:33:22 +00:00
ddb Create sys/reg.h for the common code previously in machine/reg.h 2021-08-30 12:50:53 +01:00
dev xen: plug some of set-but-not-used vars 2021-12-15 13:46:17 +00:00
dts add rk3328 overlay for enabling analog sound 2021-11-13 11:09:23 +02:00
fs nfscl: Change IO_APPEND writes to direct I/O 2021-12-15 08:35:48 -08:00
gdb gdb: report specific stop reason for watchpoints 2021-03-30 11:36:41 -03:00
geom Revert "geom_bde: plug set-but-not-used vars" 2021-12-09 19:23:05 +00:00
gnu
i386 Remove references to PCMCIA 2021-12-14 15:27:47 -07:00
isa newbus: Move from bus_child_{pnpinfo,location}_src to bus_child_{pnpinfo,location} with sbuf 2021-06-22 20:52:06 -06:00
kern imgact_elf: Disable the stack gap for now 2021-12-14 16:19:40 -05:00
kgssapi
libkern libkern: remove bcopy 2021-08-24 11:24:07 +00:00
mips busdma: Remove outdated comments about Giant. 2021-12-09 22:18:53 -05:00
modules pccard: Remove more of the PC Card infrastructure 2021-12-14 15:27:47 -07:00
net Create wrapper for Giant taken for newbus 2021-12-09 17:04:45 -07:00
net80211 net80211(4): Fix a typo in a sysctl description 2021-12-04 12:09:17 +01:00
netgraph ng_pppoe: plug set-but-not-used vars 2021-12-15 12:32:40 +00:00
netinet tcp: Rack in a rare case we can get stuck sending a very small amount. 2021-12-15 09:41:33 -05:00
netinet6 inpcb: use locked variant of prison_check_ip*() 2021-12-14 09:38:52 -08:00
netipsec ipsec: fix a logic error in key_do_getnewspi 2021-12-14 19:30:42 +00:00
netpfil dummynet: drop unused definitions 2021-12-14 13:01:15 +01:00
netsmb netsmb: Avoid a read-after-free in smb_t2_request_int() 2021-05-26 10:45:40 -04:00
nfs kernel: partially revert e9efb1125a15, default inet mask 2021-11-14 14:12:25 -06:00
nfsclient nfs: Cleanup dead files 2021-03-17 06:16:31 +11:00
nfsserver nfs: Cleanup dead files 2021-03-17 06:16:31 +11:00
nlm
ofed socket: De-duplicate SBLOCKWAIT() definitions 2021-09-14 09:01:32 -04:00
opencrypto ktls: Support for TLS 1.3 receive offload. 2021-12-14 11:01:05 -08:00
powerpc powerpc64: fix the calculation of Maxmem 2021-12-15 08:49:47 -03:00
riscv riscv: Fix PLIC -Wunused-but-set-variable warnings 2021-12-10 04:51:32 +00:00
rpc mbuf: Only allow extpg mbufs if the system has a direct map 2021-11-16 13:31:04 -05:00
security Thread creation privilege for realtime group 2021-12-15 00:01:58 +02:00
sys sys/queue.h: move trashing from SLIST_REMOVE to REMOVE_AFTER, REMOVE_HEAD 2021-12-15 13:28:33 +02:00
teken
tests routing: add IPv6 fib validation procedure. 2021-08-16 23:04:01 +00:00
tools syscalls: add COMPAT13 2021-12-09 02:48:32 +02:00
ufs Revert "ffs(3): Fix a typo in a sysctl description" 2021-12-05 13:45:47 +01:00
vm vm_fault: Fix vm_fault_populate()'s handling of VM_FAULT_WIRE 2021-12-14 15:10:46 -05:00
x86 xen: plug some of set-but-not-used vars 2021-12-15 13:46:17 +00:00
xdr
xen Create wrapper for Giant taken for newbus 2021-12-09 17:04:45 -07:00
Makefile