diff options
author | Simo Sorce <idra@samba.org> | 2011-05-05 17:56:31 -0400 |
---|---|---|
committer | Andreas Schneider <asn@samba.org> | 2011-08-10 18:14:03 +0200 |
commit | 2056d06cae4937c12433d1247b02c346625f86a4 (patch) | |
tree | fa27e0b9519cc20a37d6875de82ecc79b92809bc /source3/lib/server_prefork.h | |
parent | b9354f72291836e155ed5af56ab98b6a8537ceef (diff) | |
download | samba-2056d06cae4937c12433d1247b02c346625f86a4.tar.gz samba-2056d06cae4937c12433d1247b02c346625f86a4.tar.bz2 samba-2056d06cae4937c12433d1247b02c346625f86a4.zip |
s3-prefork: add way to manage number of clients per child
The allowed_clients var is a parent managed variable that tell children how
many clients they are allowed to handle at the same time. This way children
can overcommit but within parent controlled limits.
Signed-off-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3/lib/server_prefork.h')
-rw-r--r-- | source3/lib/server_prefork.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/lib/server_prefork.h b/source3/lib/server_prefork.h index 7e95602e81..bf9f3d3fe7 100644 --- a/source3/lib/server_prefork.h +++ b/source3/lib/server_prefork.h @@ -37,10 +37,12 @@ enum pf_server_cmds { struct pf_worker_data { pid_t pid; enum pf_worker_status status; - enum pf_server_cmds cmds; time_t started; time_t last_used; int num_clients; + + enum pf_server_cmds cmds; + int allowed_clients; }; typedef int (prefork_main_fn_t)(struct tevent_context *ev, @@ -67,6 +69,8 @@ int prefork_retire_children(struct prefork_pool *pfp, int num_children, time_t age_limit); int prefork_count_active_children(struct prefork_pool *pfp, int *total); bool prefork_mark_pid_dead(struct prefork_pool *pfp, pid_t pid); +void prefork_increase_allowed_clients(struct prefork_pool *pfp, int max); +void prefork_reset_allowed_clients(struct prefork_pool *pfp); /* ==== Functions used by children ==== */ |