From d523a6ce41c7624df0d63ea6c68561dad1ee30d6 Mon Sep 17 00:00:00 2001 From: Andriy Skulysh Date: Mon, 27 Aug 2012 12:23:53 +0300 Subject: [PATCH] LU-1963 ptlrpc: Incorrect accounting for srv_hpreq_ratio Allow one thread to always handle HP requests. Without this patch 1 thread dedicated to serve HP requests will do nothing if all normal requests are in progress for a long time but there are HP requests in input queue. Xyratex-bug-id: MRP-661 Signed-off-by: Andriy Skulysh Reviewed-by: Alexey Lyashkov Reviewed-by: Nathan Rutman Change-Id: I35f5329ca019a5d2e2dcee9d7a13eaa74e85233e Reviewed-on: http://review.whamcloud.com/4008 Reviewed-by: Andreas Dilger Tested-by: Hudson Reviewed-by: Keith Mannthey Tested-by: Maloo --- lustre/ptlrpc/service.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lustre/ptlrpc/service.c b/lustre/ptlrpc/service.c index 6d45c5c..0d44ac1 100644 --- a/lustre/ptlrpc/service.c +++ b/lustre/ptlrpc/service.c @@ -1610,6 +1610,9 @@ static int ptlrpc_server_allow_high(struct ptlrpc_service_part *svcpt, if (svcpt->scp_nreqs_active >= svcpt->scp_nthrs_running - 1) return 0; + if (svcpt->scp_nhreqs_active == 0) + return 1; + return cfs_list_empty(&svcpt->scp_req_pending) || svcpt->scp_hreq_count < svcpt->scp_service->srv_hpreq_ratio; } -- 1.8.3.1