#
7263c8c0 |
| 22-Apr-2015 |
Glen Barber <gjb@FreeBSD.org> |
MFH: r280643-r281852
Sponsored by: The FreeBSD Foundation
|
#
4bf53d0b |
| 04-Apr-2015 |
Baptiste Daroussin <bapt@FreeBSD.org> |
Merge from HEAD
|
#
3c42b5bf |
| 01-Apr-2015 |
Garrett Wollman <wollman@FreeBSD.org> |
Fix overflow bugs in and remove obsolete limit from kernel RPC implementation.
The kernel RPC code, which is responsible for the low-level scheduling of incoming NFS requests, contains a throttling
Fix overflow bugs in and remove obsolete limit from kernel RPC implementation.
The kernel RPC code, which is responsible for the low-level scheduling of incoming NFS requests, contains a throttling mechanism that prevents too much kernel memory from being tied up by NFS requests that are being serviced. When the throttle is engaged, the RPC layer stops servicing incoming NFS sockets, resulting ultimately in backpressure on the clients (if they're using TCP). However, this is a very heavy-handed mechanism as it prevents all clients from making any requests, regardless of how heavy or light they are. (Thus, when engaged, the throttle often prevents clients from even mounting the filesystem.) The throttle mechanism applies specifically to requests that have been received by the RPC layer (from a TCP or UDP socket) and are queued waiting to be serviced by one of the nfsd threads; it does not limit the amount of backlog in the socket buffers.
The original implementation limited the total bytes of queued requests to the minimum of a quarter of (nmbclusters * MCLBYTES) and 45 MiB. The former limit seems reasonable, since requests queued in the socket buffers and replies being constructed to the requests in progress will all require some amount of network memory, but the 45 MiB limit is plainly ridiculous for modern memory sizes: when running 256 service threads on a busy server, 45 MiB would result in just a single maximum-sized NFS3PROC_WRITE queued per thread before throttling.
Removing this limit exposed integer-overflow bugs in the original computation, and related bugs in the routines that actually account for the amount of traffic enqueued for service threads. The old implementation also attempted to reduce accounting overhead by batching updates until each queue is fully drained, but this is prone to livelock, resulting in repeated accumulate-throttle-drain cycles on a busy server. Various data types are changed to long or unsigned long; explicit 64-bit types are not used due to the unavailability of 64-bit atomics on many 32-bit platforms, but those platforms also cannot support nmbclusters large enough to cause overflow.
This code (in a 10.1 kernel) is presently running on production NFS servers at CSAIL.
Summary of this revision: * Removes 45 MiB limit on requests queued for nfsd service threads * Fixes integer-overflow and signedness bugs * Avoids unnecessary throttling by not deferring accounting for completed requests
Differential Revision: https://reviews.freebsd.org/D2165 Reviewed by: rmacklem, mav MFC after: 30 days Relnotes: yes Sponsored by: MIT Computer Science & Artificial Intelligence Laboratory
show more ...
|
#
d899be7d |
| 19-Jan-2015 |
Glen Barber <gjb@FreeBSD.org> |
Reintegrate head: r274132-r277384
Sponsored by: The FreeBSD Foundation
|
#
8f0ea33f |
| 13-Jan-2015 |
Glen Barber <gjb@FreeBSD.org> |
Reintegrate head revisions r273096-r277147
Sponsored by: The FreeBSD Foundation
|
#
afbe8aa4 |
| 18-Dec-2014 |
Enji Cooper <ngie@FreeBSD.org> |
MFhead @ r275911 (also, sort out MK_* flags in BMAKE, etc on this branch)
|
#
be281d70 |
| 13-Dec-2014 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r275715 through r275748.
|
#
6ddcc233 |
| 13-Dec-2014 |
Konstantin Belousov <kib@FreeBSD.org> |
Add facility to stop all userspace processes. The supposed use of the feature is to quisce the system before suspend.
Stop is implemented by reusing the thread_single(9) with the special mode SINGL
Add facility to stop all userspace processes. The supposed use of the feature is to quisce the system before suspend.
Stop is implemented by reusing the thread_single(9) with the special mode SINGLE_ALLPROC. SINGLE_ALLPROC differs from the existing single-threading modes by allowing (requiring) caller to operate on other process. Interruptible sleeps for !TDF_SBDRY threads are suspended like SIGSTOP does it, instead of aborting the sleep, like SINGLE_NO_EXIT, to avoid spurious EINTRs on resume.
Provide debugging sysctl debug.stop_all_proc, which causes total stop and suspends syncer, while waiting for variable reset for resume. It is used for debugging; should be removed after the real use of the interface is added.
In collaboration with: pho Discussed with: avg Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
show more ...
|
#
f0d7e7f7 |
| 10-Dec-2014 |
Enji Cooper <ngie@FreeBSD.org> |
MFhead @ r275663
|
#
d7e0694a |
| 08-Dec-2014 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r275478 through r275622.
|
#
f87c8878 |
| 08-Dec-2014 |
Konstantin Belousov <kib@FreeBSD.org> |
Current reaction of the nfsd worker threads to any signal is exit. This is not correct at least for the stop requests. Check for stop conditions and suspend threads if requested.
Reported and teste
Current reaction of the nfsd worker threads to any signal is exit. This is not correct at least for the stop requests. Check for stop conditions and suspend threads if requested.
Reported and tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week
show more ...
|
Revision tags: release/10.1.0 |
|
#
246e7a2b |
| 02-Sep-2014 |
Neel Natu <neel@FreeBSD.org> |
IFC @r269962
Submitted by: Anish Gupta (akgupt3@gmail.com)
|
#
ee7b0571 |
| 19-Aug-2014 |
Simon J. Gerraty <sjg@FreeBSD.org> |
Merge head from 7/28
|
Revision tags: release/9.3.0 |
|
#
82dcc80d |
| 09-Jun-2014 |
Alexander Motin <mav@FreeBSD.org> |
Fix race in r267221.
MFC after: 2 weeks
|
#
b563304c |
| 08-Jun-2014 |
Alexander Motin <mav@FreeBSD.org> |
Split RPC pool threads into number of smaller semi-isolated groups.
Old design with unified thread pool was good from the point of thread utilization. But single pool-wide mutex became huge congest
Split RPC pool threads into number of smaller semi-isolated groups.
Old design with unified thread pool was good from the point of thread utilization. But single pool-wide mutex became huge congestion point for systems with many CPUs. To reduce the congestion create several thread groups within a pool (one group for every 6 CPUs and 12 threads), each group with own mutex. Each connection during its registration is assigned to one of the groups in round-robin fashion. File affinify code may still move requests between the groups, but otherwise groups are self-contained.
MFC after: 2 weeks Sponsored by: iXsystems, Inc.
show more ...
|
#
b5d7fb73 |
| 08-Jun-2014 |
Alexander Motin <mav@FreeBSD.org> |
Remove st_idle variable, duplicating st_xprt.
MFC after: 2 weeks
|
#
b776fb2d |
| 08-Jun-2014 |
Alexander Motin <mav@FreeBSD.org> |
Introduce new per-thread lock to protect the list of requests.
This allows to slightly simplify svc_run_internal() code: if we processed all the requests in a queue, then we know that new one will n
Introduce new per-thread lock to protect the list of requests.
This allows to slightly simplify svc_run_internal() code: if we processed all the requests in a queue, then we know that new one will not appear.
MFC after: 2 weeks
show more ...
|
#
6cec9cad |
| 03-Jun-2014 |
Peter Grehan <grehan@FreeBSD.org> |
MFC @ r266724
An SVM update will follow this.
|
#
3b8f0845 |
| 28-Apr-2014 |
Simon J. Gerraty <sjg@FreeBSD.org> |
Merge head
|
#
84e51a1b |
| 23-Apr-2014 |
Alan Somers <asomers@FreeBSD.org> |
IFC @264767
|
#
c98bb15d |
| 21-Feb-2014 |
Glen Barber <gjb@FreeBSD.org> |
MFH: tracking commit
Sponsored by: The FreeBSD Foundation
|
#
5748b897 |
| 19-Feb-2014 |
Martin Matuska <mm@FreeBSD.org> |
Merge head up to r262222 (last merge was incomplete).
|
#
485ac45a |
| 04-Feb-2014 |
Peter Grehan <grehan@FreeBSD.org> |
MFC @ r259205 in preparation for some SVM updates. (for real this time)
|
#
b4fced90 |
| 04-Feb-2014 |
Alexander Motin <mav@FreeBSD.org> |
Fix lock acquisition in case no request space available, missed in r260097.
MFC after: 3 days
|
Revision tags: release/10.0.0 |
|
#
e01ff621 |
| 09-Jan-2014 |
Glen Barber <gjb@FreeBSD.org> |
MFH: tracking commit (head@r260486)
Sponsored by: The FreeBSD Foundation
|