From: Liang Zhen Date: Mon, 2 Feb 2015 02:52:00 +0000 (-0500) Subject: staging/lustre/ptlrpc: avoid list scan in ptlrpcd_check X-Git-Tag: omap-for-v4.1/prcm-dts-mfd-syscon-fix~83^2~31 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa55c6a4b41cd4fd240debe719b205056b04a0bf;p=pandora-kernel.git staging/lustre/ptlrpc: avoid list scan in ptlrpcd_check ptlrpcd_check() always scan all requests on ptlrpc_request_set and try to finish completed requests, this is low efficiency. Even worse, l_wait_event() always checks condition for twice before sleeping and one more time after waking up, which means it will call ptlrpcd_check() for three times in each loop. This patch will move completed requests at the head of list in ptlrpc_check_set(), with this change ptlrpcd_check doesn't need to scan all requests anymore. Signed-off-by: Liang Zhen Reviewed-on: http://review.whamcloud.com/11513 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5548 Reviewed-by: Bobi Jam Reviewed-by: Andreas Dilger Reviewed-by: Johann Lombardi Signed-off-by: Oleg Drokin Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed