diff options
Diffstat (limited to 'include/linux/sunrpc')
-rw-r--r-- | include/linux/sunrpc/svc.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index 39ec186a492d..9f9f699dd469 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h | |||
@@ -24,6 +24,15 @@ | |||
24 | */ | 24 | */ |
25 | typedef int (*svc_thread_fn)(void *); | 25 | typedef int (*svc_thread_fn)(void *); |
26 | 26 | ||
27 | /* statistics for svc_pool structures */ | ||
28 | struct svc_pool_stats { | ||
29 | unsigned long packets; | ||
30 | unsigned long sockets_queued; | ||
31 | unsigned long threads_woken; | ||
32 | unsigned long overloads_avoided; | ||
33 | unsigned long threads_timedout; | ||
34 | }; | ||
35 | |||
27 | /* | 36 | /* |
28 | * | 37 | * |
29 | * RPC service thread pool. | 38 | * RPC service thread pool. |
@@ -42,6 +51,7 @@ struct svc_pool { | |||
42 | unsigned int sp_nrthreads; /* # of threads in pool */ | 51 | unsigned int sp_nrthreads; /* # of threads in pool */ |
43 | struct list_head sp_all_threads; /* all server threads */ | 52 | struct list_head sp_all_threads; /* all server threads */ |
44 | int sp_nwaking; /* number of threads woken but not yet active */ | 53 | int sp_nwaking; /* number of threads woken but not yet active */ |
54 | struct svc_pool_stats sp_stats; /* statistics on pool operation */ | ||
45 | } ____cacheline_aligned_in_smp; | 55 | } ____cacheline_aligned_in_smp; |
46 | 56 | ||
47 | /* | 57 | /* |
@@ -396,6 +406,7 @@ struct svc_serv * svc_create_pooled(struct svc_program *, unsigned int, | |||
396 | sa_family_t, void (*shutdown)(struct svc_serv *), | 406 | sa_family_t, void (*shutdown)(struct svc_serv *), |
397 | svc_thread_fn, struct module *); | 407 | svc_thread_fn, struct module *); |
398 | int svc_set_num_threads(struct svc_serv *, struct svc_pool *, int); | 408 | int svc_set_num_threads(struct svc_serv *, struct svc_pool *, int); |
409 | int svc_pool_stats_open(struct svc_serv *serv, struct file *file); | ||
399 | void svc_destroy(struct svc_serv *); | 410 | void svc_destroy(struct svc_serv *); |
400 | int svc_process(struct svc_rqst *); | 411 | int svc_process(struct svc_rqst *); |
401 | int svc_register(const struct svc_serv *, const unsigned short, | 412 | int svc_register(const struct svc_serv *, const unsigned short, |