Whamcloud - gitweb
b=21140 Fix srv_threads_running counting.
It was possible to overload n_active_request processing incoming requests and
break the thread reservation logic. Likely, it was responsible to the long
processing of requests.
The patch makes srv_threads_running to exactly count only running not sleeping
threads. All threads accounting and comparing/reservation of threads are done
under the service spinlock so it produce a reliable result. The thread
reservation logic is based on new srv_threads_running value and cannot be
confused by not active sleeping threads. The thread reservation logic is
concentrated now in one place, where the wakeup condition is checked (now in
ptlrpc_main_check_event), once a thread is woken up, it is counted as running
and does further work w/o additional checks.
i=zhen.liang
i=robert.read