[LU-5548] avoid list scan in ptlrpcd_check Created: 27/Aug/14  Updated: 27/Apr/15  Resolved: 03/Sep/14

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.7.0, Lustre 2.5.4

Type: Bug Priority: Minor
Reporter: Liang Zhen (Inactive) Assignee: Liang Zhen (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 15470

 Description   

ptlrpcd_check() always scan all requests on ptlrpc_request_set::set_requests 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.

The solution is quite simple, ptlrpc_check_set() can move completed requests at head of ptlrpc_request_set::set_requests, so ptlrpcd_check doesn't need to scan all requests on a rqset anymore.

This is an improvement for LU-5053.



 Comments   
Comment by Liang Zhen (Inactive) [ 27/Aug/14 ]

Patch is here: http://review.whamcloud.com/#/c/11513/

Comment by Liang Zhen (Inactive) [ 03/Sep/14 ]

patch landed

Comment by Gerrit Updater [ 01/Dec/14 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/12265/
Subject: LU-5548 ptlrpc: avoid list scan in ptlrpcd_check
Project: fs/lustre-release
Branch: b2_5
Current Patch Set:
Commit: f3c91d57afb631d9d008710b4d144734bfe97a4f

Generated at Sat Feb 10 01:52:26 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.