Whamcloud - gitweb
LU-947 ptlrpc: allow stopping threads above threads_max 00/34400/6
authorAndreas Dilger <adilger@whamcloud.com>
Tue, 12 Mar 2019 08:12:03 +0000 (02:12 -0600)
committerOleg Drokin <green@whamcloud.com>
Sun, 21 Apr 2019 05:47:14 +0000 (05:47 +0000)
commit183cb1e3cdd2de93aca5dff79b3d56bbadc00178
tree55064e9d6d0bfd0ed8d6ee28f5acb2fdfcb1d809
parente82adfcbd00fecaf588ee8ddd3d5432a5d92a51d
LU-947 ptlrpc: allow stopping threads above threads_max

If a service "threads_max" parameter is set below the number of
running threads, stop each highest-numbered running thread until
the running thread count is below threads_max.  Stopping nly the
last thread ensures the thread t_id numbers are always contiguous
rather than having gaps.  If the threads are started again they
will again be assigned contiguous t_id values.

Each thread is stopped only after it has finished processing an
incoming request, so running threads may not immediately stop
when the tunable is changed.

Also fix function declarations in file to match proper coding style.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I106f841e62c26b488ae837564c858a44263ebbe5
Reviewed-on: https://review.whamcloud.com/34400
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Wang Shilong <wshilong@ddn.com>
Reviewed-by: Hongchao Zhang <hongchao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/ptlrpc/service.c