Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
timer.c File Reference
#include <asm/param.h>
#include <linux/types.h>
#include <linux/unistd.h>
#include <linux/module.h>
#include <linux/sunrpc/clnt.h>

Go to the source code of this file.

Macros

#define RPC_RTO_MAX   (60*HZ)
 
#define RPC_RTO_INIT   (HZ/5)
 
#define RPC_RTO_MIN   (HZ/10)
 

Functions

void rpc_init_rtt (struct rpc_rtt *rt, unsigned long timeo)
 
 EXPORT_SYMBOL_GPL (rpc_init_rtt)
 
void rpc_update_rtt (struct rpc_rtt *rt, unsigned int timer, long m)
 
 EXPORT_SYMBOL_GPL (rpc_update_rtt)
 
unsigned long rpc_calc_rto (struct rpc_rtt *rt, unsigned int timer)
 
 EXPORT_SYMBOL_GPL (rpc_calc_rto)
 

Macro Definition Documentation

#define RPC_RTO_INIT   (HZ/5)

Definition at line 25 of file timer.c.

#define RPC_RTO_MAX   (60*HZ)

Definition at line 24 of file timer.c.

#define RPC_RTO_MIN   (HZ/10)

Definition at line 26 of file timer.c.

Function Documentation

EXPORT_SYMBOL_GPL ( rpc_init_rtt  )
EXPORT_SYMBOL_GPL ( rpc_update_rtt  )
EXPORT_SYMBOL_GPL ( rpc_calc_rto  )
unsigned long rpc_calc_rto ( struct rpc_rtt rt,
unsigned int  timer 
)

rpc_calc_rto - Provide an estimated timeout value : context to use for calculation : timer array index (request type)

Estimate RTO for an NFS RPC sent via an unreliable datagram. Use the mean and mean deviation of RTT for the appropriate type of RPC for frequently issued RPCs, and a fixed default for the others.

The justification for doing "other" this way is that these RPCs happen so infrequently that timer estimation would probably be stale. Also, since many of these RPCs are non-idempotent, a conservative timeout is desired.

getattr, lookup, read, write, commit - A+4D other - timeo

Definition at line 109 of file timer.c.

void rpc_init_rtt ( struct rpc_rtt rt,
unsigned long  timeo 
)

rpc_init_rtt - Initialize an RPC RTT estimator context : context to initialize : initial timeout value, in jiffies

Definition at line 34 of file timer.c.

void rpc_update_rtt ( struct rpc_rtt rt,
unsigned int  timer,
long  m 
)

rpc_update_rtt - Update an RPC RTT estimator context : context to update : timer array index (request type) : recent actual RTT, in jiffies

NB: When computing the smoothed RTT and standard deviation, be careful not to produce negative intermediate results.

Definition at line 60 of file timer.c.