Restore updated thread fridge.

The thread fridge is now a thread pool ADT, without static
data.  Most other details are currently carried forward from
the original fridge.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Fridge fixes from integration testing.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Add glist_splice_tail.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
NFS OP Lookahead.

Consolidate a trace of NFS operations (including those in
compounds) while decoding.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>

Conflicts:
	src/MainNFSD/nfs_worker_thread.c
	src/Protocols/XDR/xdr_nfs23.c
	src/RPCAL/Svc_auth_gss.c
	src/include/nfsv41.h

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Inverted dispatch model prototype.

In the new model, developed with input from Bruce Lucas (IBM),
request decoding is again decoupled from the worker pool.  A new
style dynamic pool of decoder threads servicing all connections
replaces the original thread-per-connection decoders.  New requests
are inserted in a global (priority) queue, sorted by a new lookahead
classification (nod to Philippe, Jim).  The queue structure is likely
to see some adjustment, but does provide new prioritization (mount,
call, high and low latency) behavior, as discussed in the development
call.

Currently, resource consumption is constrained by two decoded request
quotas, one global, and one per-xprt.  If the global limit is reached,
event threads are delayed until it clears.  If a per-xprt limit is
reached, the affected xprt is 'stalled'--i.e., is unregistered from its
event channel, and added to a queue of stalled xprts, until it clears
or idles out (or is otherwise destroyed).  When the stall queue is
non-empty, a thread from the decoder fridge is dispatched to periodically
scan and unstall cleared xprts.  (Not to Boaz, Brent.  Feedback
appreciated.)

Invert dispatch cleanups and fixes 1.

In addition to general polish, includes fixes for xprt
refcnt leak, leaked fridge mutex in fridgethr_star_routine.
Fix leak of worker 0, due to accidental edit.

Incremental dispatcher cleanup with some testing artifacts
(e.g., #if sections, inlcuding simplified dispatcher queue
for perf. baseline).

The most important change is to track TI-RPC switch to
EPOLLONESHOT style event handling.  The oneshot style gives
atomicity, and the inline call to gsh_destroy_xprt on xprt
error now -appears- safe.

Bump tirpc.sh version.
Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Merge parallel send/recv.  Track TI-RPC svcauth cleanup.
Remove unused RPCAL code.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>

Conflicts:
	src/MainNFSD/nfs_worker_thread.c
	src/include/ganesha_rpc.h

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Bump TI-RPC version.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Dont fall through MOUNT.

Tracks fix by Adam for 1.5.x.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Move AuthenticateRequest into svc_rpc_dispatcher.c, since it
is now called from there.  Mark it inline.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Normalize delays in dispatcher hot path, to 5ms.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Bump TI-RPC version.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Split slot spinlock.  Bump TI-RPC version.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
* Initialize svc parameters
* Get rid of junk pointer in DRC

Signed-off-by: Adam C. Emerson <aemerson@linuxbox.com>
Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Clear xp_u1 in xprt destructor callout.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Initialize xu->drc in allocator

Signed-off-by: Adam C. Emerson <aemerson@linuxbox.com>
Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Put in more fake lookaheads

Signed-off-by: Adam C. Emerson <aemerson@linuxbox.com>
Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Protect error replies with DISP_SLOCK.  (Should be
redesigned.)

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Bump TI-RPC version.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Restore continue-decoding conditional behavior for throughput
experimentation.

The behavior is now encapsulated in the nfs_rpc_continue_decoding
inline function, and is disabled.  Initial testing did not appear
to show benefit.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Bump TI-RPC version.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>