diff options
| author | Trond Myklebust <trond.myklebust@primarydata.com> | 2016-06-24 10:55:50 -0400 |
|---|---|---|
| committer | J. Bruce Fields <bfields@redhat.com> | 2016-07-13 15:53:48 -0400 |
| commit | ff3ac5c3dc2323ba54c3d9ef30ef4942a71b251d (patch) | |
| tree | 5efd439be1327a0c48c9103336e113186d3051cd /include/linux/sunrpc | |
| parent | 4720b0703a0dfcd6da6a308ea71aaacc55beade7 (diff) | |
SUNRPC: Add a server side per-connection limit
Allow the user to limit the number of requests serviced through a single
connection, to help prevent faster clients from starving slower clients.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'include/linux/sunrpc')
| -rw-r--r-- | include/linux/sunrpc/svc.h | 1 | ||||
| -rw-r--r-- | include/linux/sunrpc/svc_xprt.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index 7ca44fb5b675..7321ae933867 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h | |||
| @@ -268,6 +268,7 @@ struct svc_rqst { | |||
| 268 | * cache pages */ | 268 | * cache pages */ |
| 269 | #define RQ_VICTIM (5) /* about to be shut down */ | 269 | #define RQ_VICTIM (5) /* about to be shut down */ |
| 270 | #define RQ_BUSY (6) /* request is busy */ | 270 | #define RQ_BUSY (6) /* request is busy */ |
| 271 | #define RQ_DATA (7) /* request has data */ | ||
| 271 | unsigned long rq_flags; /* flags field */ | 272 | unsigned long rq_flags; /* flags field */ |
| 272 | 273 | ||
| 273 | void * rq_argp; /* decoded arguments */ | 274 | void * rq_argp; /* decoded arguments */ |
diff --git a/include/linux/sunrpc/svc_xprt.h b/include/linux/sunrpc/svc_xprt.h index 79ba50856707..ad899ffed3be 100644 --- a/include/linux/sunrpc/svc_xprt.h +++ b/include/linux/sunrpc/svc_xprt.h | |||
| @@ -69,6 +69,7 @@ struct svc_xprt { | |||
| 69 | 69 | ||
| 70 | struct svc_serv *xpt_server; /* service for transport */ | 70 | struct svc_serv *xpt_server; /* service for transport */ |
| 71 | atomic_t xpt_reserved; /* space on outq that is rsvd */ | 71 | atomic_t xpt_reserved; /* space on outq that is rsvd */ |
| 72 | atomic_t xpt_nr_rqsts; /* Number of requests */ | ||
| 72 | struct mutex xpt_mutex; /* to serialize sending data */ | 73 | struct mutex xpt_mutex; /* to serialize sending data */ |
| 73 | spinlock_t xpt_lock; /* protects sk_deferred | 74 | spinlock_t xpt_lock; /* protects sk_deferred |
| 74 | * and xpt_auth_cache */ | 75 | * and xpt_auth_cache */ |
