Whamcloud - gitweb
EX-5014 pcc: Limit attach queue depth
authorPatrick Farrell <pfarrell@whamcloud.com>
Wed, 13 Apr 2022 15:31:15 +0000 (11:31 -0400)
committerAndreas Dilger <adilger@whamcloud.com>
Fri, 26 Aug 2022 16:05:29 +0000 (16:05 +0000)
commite5de5a703811f3a70b5e17a82acfc32ff45c7f51
treee5382a6f8fdd39d241b2db09a7493ce2bee804b4
parent1a8da7bdc620b86d5bdbe80e07db7f2a64929f48
EX-5014 pcc: Limit attach queue depth

The existing async attach code does not attempt to limit
the number of async attaches that can be requested at once.
This is a problem because we could theoretically create too
many kthreads and overwhelm the system.

When the attach queue depth is exceeded, we stop allowing
new items to be queued by switching over to sync attach.

Ideally we would rebuild the attach code to generate a
queue of attach requests and have the attach thread code
pull items from the queue until it's exhausted, but that's
a much more substantial change and is left for later.

NB: This patch is incomplete - there's no way to adjust the
queue depth at runtime and there's no test for it.  Both
need to be added.

Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: Ib00dfb67f5245a28b722278d031ee8cdf5e190d6
Reviewed-on: https://review.whamcloud.com/47061
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Yingjin Qian <qian@ddn.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/llite/pcc.c
lustre/llite/pcc.h