Lines Matching refs:pool

473 		struct svc_pool *pool = &serv->sv_pools[i];  in __svc_create()  local
478 pool->sp_id = i; in __svc_create()
479 INIT_LIST_HEAD(&pool->sp_sockets); in __svc_create()
480 INIT_LIST_HEAD(&pool->sp_all_threads); in __svc_create()
481 spin_lock_init(&pool->sp_lock); in __svc_create()
607 svc_prepare_thread(struct svc_serv *serv, struct svc_pool *pool, int node) in svc_prepare_thread() argument
619 rqstp->rq_pool = pool; in svc_prepare_thread()
620 spin_lock_bh(&pool->sp_lock); in svc_prepare_thread()
621 pool->sp_nrthreads++; in svc_prepare_thread()
622 list_add_rcu(&rqstp->rq_all, &pool->sp_all_threads); in svc_prepare_thread()
623 spin_unlock_bh(&pool->sp_lock); in svc_prepare_thread()
648 choose_pool(struct svc_serv *serv, struct svc_pool *pool, unsigned int *state) in choose_pool() argument
650 if (pool != NULL) in choose_pool()
651 return pool; in choose_pool()
660 choose_victim(struct svc_serv *serv, struct svc_pool *pool, unsigned int *state) in choose_victim() argument
665 if (pool != NULL) { in choose_victim()
666 spin_lock_bh(&pool->sp_lock); in choose_victim()
670 pool = &serv->sv_pools[--(*state) % serv->sv_nrpools]; in choose_victim()
671 spin_lock_bh(&pool->sp_lock); in choose_victim()
672 if (!list_empty(&pool->sp_all_threads)) in choose_victim()
674 spin_unlock_bh(&pool->sp_lock); in choose_victim()
680 if (!list_empty(&pool->sp_all_threads)) { in choose_victim()
687 rqstp = list_entry(pool->sp_all_threads.next, struct svc_rqst, rq_all); in choose_victim()
692 spin_unlock_bh(&pool->sp_lock); in choose_victim()
712 svc_set_num_threads(struct svc_serv *serv, struct svc_pool *pool, int nrservs) in svc_set_num_threads() argument
721 if (pool == NULL) { in svc_set_num_threads()
725 spin_lock_bh(&pool->sp_lock); in svc_set_num_threads()
726 nrservs -= pool->sp_nrthreads; in svc_set_num_threads()
727 spin_unlock_bh(&pool->sp_lock); in svc_set_num_threads()
733 chosen_pool = choose_pool(serv, pool, &state); in svc_set_num_threads()
761 (task = choose_victim(serv, pool, &state)) != NULL) { in svc_set_num_threads()
778 struct svc_pool *pool = rqstp->rq_pool; in svc_exit_thread() local
785 spin_lock_bh(&pool->sp_lock); in svc_exit_thread()
786 pool->sp_nrthreads--; in svc_exit_thread()
789 spin_unlock_bh(&pool->sp_lock); in svc_exit_thread()