diff options
| author | Trond Myklebust <trond.myklebust@fys.uio.no> | 2002-07-16 01:53:29 -0700 |
|---|---|---|
| committer | Trond Myklebust <trond.myklebust@fys.uio.no> | 2002-07-16 01:53:29 -0700 |
| commit | 77d7903022dbd92040f4afdfb5e05d9005a88a7f (patch) | |
| tree | ba6f7a5b70f03d2c67dec1d2fca833b634000437 /include/linux/sunrpc/timer.h | |
| parent | ad4d2648caa581162d6c6e2a3805a0095448ae15 (diff) | |
[PATCH] RPC over UDP congestion control updates [1/8]
Implement the basic round trip timing algorithm in order to adapt the
timeout values for the most common NFS operations to the server's
rate of response.
Algorithm is described in Van Jacobson's paper 1998 paper
on http://www-nrg.ee.lbl.gov/nrg-papers.html, and is the same as is
used for most TCP stacks.
Following the *BSD code, we implement separate rtt timers for GETATTR,
LOOKUP, READ/READDIR/READLINK, and WRITE. In addition to this, there
is one extra timer for the COMMIT operation.
All the remaining RPC calls use the current system in which a fixed
timeout value gets set by the 'timeo' mount option.
In case of a timeout, the current exponential backoff algoritm is
implemented. Subsequent patches will improve this...
Diffstat (limited to 'include/linux/sunrpc/timer.h')
| -rw-r--r-- | include/linux/sunrpc/timer.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/include/linux/sunrpc/timer.h b/include/linux/sunrpc/timer.h new file mode 100644 index 000000000000..5f59407fed49 --- /dev/null +++ b/include/linux/sunrpc/timer.h @@ -0,0 +1,23 @@ +/* + * linux/include/linux/sunrpc/timer.h + * + * Declarations for the RPC transport timer. + * + * Copyright (C) 2002 Trond Myklebust <trond.myklebust@fys.uio.no> + */ + +#ifndef _LINUX_SUNRPC_TIMER_H +#define _LINUX_SUNRPC_TIMER_H + +struct rpc_rtt { + long timeo; /* default timeout value */ + long srtt[5]; /* smoothed round trip time << 3 */ + long sdrtt[5]; /* soothed medium deviation of RTT */ +}; + + +extern void rpc_init_rtt(struct rpc_rtt *rt, long timeo); +extern void rpc_update_rtt(struct rpc_rtt *rt, int timer, long m); +extern long rpc_calc_rto(struct rpc_rtt *rt, int timer); + +#endif /* _LINUX_SUNRPC_TIMER_H */ |
