History log of /dflybsd-src/sys/vfs/nfs/nfs_iod.c (Results 1 – 13 of 13)
Revision Date Author Comments
# f354e0e6 28-Mar-2020 Sascha Wildner <saw@online.de>

kernel: Remove <sys/mutex.h> from all files that don't need it.

98% of these were remains from porting from FreeBSD which could have
been removed after converting to lockmgr(), etc.

While here, do

kernel: Remove <sys/mutex.h> from all files that don't need it.

98% of these were remains from porting from FreeBSD which could have
been removed after converting to lockmgr(), etc.

While here, do the same for <sys/mutex2.h>.

show more ...


# fcf6efef 02-Mar-2019 Sascha Wildner <saw@online.de>

kernel: Remove numerous #include <sys/thread2.h>.

Most of them were added when we converted spl*() calls to
crit_enter()/crit_exit(), almost 14 years ago. We can now
remove a good chunk of them agai

kernel: Remove numerous #include <sys/thread2.h>.

Most of them were added when we converted spl*() calls to
crit_enter()/crit_exit(), almost 14 years ago. We can now
remove a good chunk of them again for where crit_*() are
no longer used.

I had to adjust some files that were relying on thread2.h
or headers that it includes coming in via other headers
that it was removed from.

show more ...


# cfc3386f 18-Sep-2010 Sascha Wildner <saw@online.de>

kernel: Remove #include <sys/mutex.h> if <sys/mutex2.h> is included too.


# 104db2fb 16-Sep-2010 Matthew Dillon <dillon@apollo.backplane.com>

kernel - Fix NFS panic

* nfs_write() was not wrapped with a token, leading to races.

* Add some queueing assertions while we are here.

Reported-by: Thomas Nikolajsen <thomas.nikolajsen@mail.dk>


# c6b43e93 10-Sep-2010 Matthew Dillon <dillon@apollo.backplane.com>

network - Tokenize NFS, fix MP races

* Now that the rest of the network stack is running MPSAFE, poor NFS is
hitting races and other issues because it was depending on the MP lock.

* Recombobulat

network - Tokenize NFS, fix MP races

* Now that the rest of the network stack is running MPSAFE, poor NFS is
hitting races and other issues because it was depending on the MP lock.

* Recombobulate NFS with tokens, protecting all border crossings:

A global nfs_token is used for the nfs mount list, nfsd list, and
server socket list.

A per-socket token (nfssvc_sock->ns_token) governs each served mount.

A per-mount token (nfsmount->nm_token) governs each client mount.

* Callouts and TCP upcalls are protected. The per-socket TCP upcall
is protected by the nfssvc_sock token.

* The NFS iod thread pairs and nfsd threads now run MPSAFE.

* NFSv3 is now holy-shit fast and can trivially max-out a GigE link
without TSO when the server is not otherwise limited by server-side
disks.

show more ...


# c9e9fb21 29-Aug-2010 Matthew Dillon <dillon@apollo.backplane.com>

kernel - All lwkt thread now start out mpsafe part 1/2

* All callers of lwkt_init_thread(), lwkt_create() and lwkt_alloc_thread()
now always pass TDF_MPSAFE and the flag is asserted in the low lev

kernel - All lwkt thread now start out mpsafe part 1/2

* All callers of lwkt_init_thread(), lwkt_create() and lwkt_alloc_thread()
now always pass TDF_MPSAFE and the flag is asserted in the low level
thread creation code.

show more ...


# b9a7a2bd 10-Oct-2009 Matthew Dillon <dillon@apollo.backplane.com>

NFS - Fix numerous issues with NFS root mounts, primarily for vkernels

vkernels do not inherit BOOTP data from PXE and because of this a number
of code paths are run which are not run in non-vkernel

NFS - Fix numerous issues with NFS root mounts, primarily for vkernels

vkernels do not inherit BOOTP data from PXE and because of this a number
of code paths are run which are not run in non-vkernel NFS mounts.

* Fix a kernel memory check that was failing for vkernels and causing a
panic.

* Change the default BOOTP socket type from UDP to TCP.

* Adjust the default vfs.nfs.maxasyncbio value based on available mbuf
clusters. The value will be adjusted down for systems with small
memory footprints.

Otherwise NFS can trivially run the system out of mbufs.

* Fix bugs in the NFS BIO queueing code related to values of
vfs.nfs.maxasyncbio lower then the maximum.

* Remove the BOOTP_NFSV3 option when probing for the type of NFS mount
(V2 or V3). The BOOTP_NFSV3 kernel option is no longer required for
root mounts to default to NFSv3.

This also works around a bug related to large write()s with NFSv2 which
has not yet been found.

Reported-by: Rumko <rumcic@gmail.com>

show more ...


# a63246d1 28-Aug-2009 Matthew Dillon <dillon@apollo.backplane.com>

NFS - Fix remaining VM/BIO issues

The only bug that could not be resolved by the previous commit is related
to the use of dynamic buffer sizing for the buffer that straddles the
EOF of the file. Fo

NFS - Fix remaining VM/BIO issues

The only bug that could not be resolved by the previous commit is related
to the use of dynamic buffer sizing for the buffer that straddles the
EOF of the file. For example, if a file is 32768+4127 bytes then the
second buffer cache buffer would have a size of 4127 bytes instead of
32768 bytes. Because the EOF point can move around and NFS does not
keep good track of it buffers with weird sizes could build up in the
system and interfere with operations against backing VM pages.

In particular truncations followed by seek-write extensions would
interfere with mmap()'s areas around the original (now non-applicable)
truncation point.

It was not possible to fix this bug while still keeping the dynamic
buffer sizing, so this patch converts NFS's buffer cache operations
to use fixed-sized buffers in all cases. This leads to more wasted
memory when dealing with small files and further optimizations may be
attempted in the future, but it seems to solve issues with BIO/VM
interactions.

* Fsx now survives an overnight pass.

* Buildworld now survives multiple passes when using a writable NFS /usr/obj.

* Fix umount sequencing. Sometimes the rxthread would get into a
reconnect loop and not exit.

show more ...


# cc7d050e 18-Jul-2009 Matthew Dillon <dillon@apollo.backplane.com>

NFS - Implement async write BIO, greatly increase sockbuf limits, better rexmit

* Write BIOs are now executed asynchronously.

* Commit BIOs are now executed asynchronously.

* Increase the sockbuf

NFS - Implement async write BIO, greatly increase sockbuf limits, better rexmit

* Write BIOs are now executed asynchronously.

* Commit BIOs are now executed asynchronously.

* Increase the sockbuf limit to around 2MBytes, which is what is needed
to handle the burst writing a DragonFly client can do now when the
kernel flushes its buffers (at least for a UDP socket).

* Adjust the rexmit code. Also detect duplicate packets received and
adjust the SRTT up a little since no RTT is calculated when a timeout
occurs.

* NEW SYSCTLS:

vfs.nfs.soreserve - This parameter now overrides all other kernel and
user parameters to set the NFS sockets limit.

vfs.nfs.maxasyncbio - This is set to the hard-coded maximum by default
and may be reduced to accomodate insufficiently
endowed remote servers.

* NOTE ON UDP MOUNTS TO REMOTE SERVERS. If the remote server does not have
sufficient sockbuf space to receive a large burst of UDP packets performance
will suffer greatly. To allieviate this issue you can decrease
vfs.nfs.maxasyncbio on the DragonFly client, or you can simply use a
TCP mount.

show more ...


# f8565b0f 18-Jul-2009 Matthew Dillon <dillon@apollo.backplane.com>

NFS - Rewrite the RTT code and the request flags & low level state machine

* The RTT code basically did not work with UDP, and never has very well.
Use a somewhat different algorithm and make more

NFS - Rewrite the RTT code and the request flags & low level state machine

* The RTT code basically did not work with UDP, and never has very well.
Use a somewhat different algorithm and make more of an assumption that
the network is either reliable, or if it isn't reliable that the sysad
is using a reliable protocol (such as TCP).

The new RTT code should do a better job, though there will still
be significant stalling on a lossy network if using UDP (too bad!).

* Replace the congestion control code. Instead of trying to defer
packet transmission to the nfs_timer, which we no longer run at
insane rates, we instead limit the number of async BIOs we allow
to be queued at any given moment.

* Redo the req->r_flags flags and the low level RPC interlocks between
the various consumers and producers. Add additional flags that
can be tested in assertions to validate expectations.

Use R_LOCKED for more then just the nfs_timer code.

* Close a memory hole.

* Hold critical sections to close races that could result in a
thread deadlocking in soreceive waiting for a reply that another
thread already processed.

* Add two sysctls to aid in testing.

vfs.nfs.showrexmit - Causes "X" to be printed on the console whenever
NFS feels that it must retransmit a RPC. Only
occurs with UDP mounts.

vfs.nfs.showrtt - Causes NFS to print out the SRTT, SDRTT, and
converted timeout calculation once a second
while NFS requests are active.

* Increase the asynchronous BIO limits. Because we only need two helper
threads and no longer depend on dozens of synchronous-rpc threads
(the old nfsiod's), there is no practical limit to the number of
requests we can have active.

Reformulate how asynchronous BIOs are accounted for. They are now
accounted for from the moment they are queued to the very end where
they are biodone()'d.

show more ...


# 13ddc895 17-Jul-2009 Matthew Dillon <dillon@apollo.backplane.com>

NFS - Fix unmounting blockages, fix tick interval, hack cpu assignments.

* Umount was having problems due to the way the helper threads were
being shutdown. Should be fixed.

* The NFS timer, whi

NFS - Fix unmounting blockages, fix tick interval, hack cpu assignments.

* Umount was having problems due to the way the helper threads were
being shutdown. Should be fixed.

* The NFS timer, which is responsible for handling retransmits and
timeouts, did not need to be set to one tick (10ms). 200ms is
just fine.

* Hack cpu assignments for the tx and rx helper threads.

show more ...


# edb90c22 17-Jul-2009 Matthew Dillon <dillon@apollo.backplane.com>

NFS - implement async state machine for nfs_readrpc_bio()

Implement the basic state machine mechanics to allow the two
helper threads to separate transmit and receive work for any
number of NFS RPCs.


# 52e1cf57 16-Jul-2009 Matthew Dillon <dillon@apollo.backplane.com>

NFS - Remove old nfsiod, start adding new kernel thread infrastructure

* Remove all the nfsiod junk.

* Add two per-mount threads, one for reading from the socket, one for writing
to the socket, i

NFS - Remove old nfsiod, start adding new kernel thread infrastructure

* Remove all the nfsiod junk.

* Add two per-mount threads, one for reading from the socket, one for writing
to the socket, in a new file nfs_iod.c

* Implement a quick and dirty synchronous, single threaded nfs_doio()
loop in the writer thread to test basic mechanics.

show more ...