Whamcloud - gitweb
LU-1963 ptlrpc: Incorrect accounting for srv_hpreq_ratio
authorAndriy Skulysh <Andriy_Skulysh@xyratex.com>
Mon, 27 Aug 2012 09:23:53 +0000 (12:23 +0300)
committerOleg Drokin <green@whamcloud.com>
Sun, 7 Oct 2012 04:57:30 +0000 (00:57 -0400)
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 <Andriy_Skulysh@xyratex.com>
Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Reviewed-by: Nathan Rutman <nathan.rutman@xyratex.com>
Change-Id: I35f5329ca019a5d2e2dcee9d7a13eaa74e85233e
Reviewed-on: http://review.whamcloud.com/4008
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
lustre/ptlrpc/service.c

index 6d45c5c..0d44ac1 100644 (file)
@@ -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;
 }