[LU-16004] Blocking callback for already cancelling lock that would have no IO Created: 11/Jul/22  Updated: 22/Jan/24

Status: Open
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Oleg Drokin Assignee: WC Triage
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Related
is related to LU-17446 BL AST should stop resending if lock ... Open
Rank (Obsolete): 9223372036854775807

 Description   

It looks like when we have blocking callback come for a lock that is already undergoing canceling (canceling bit is set), we just tell the server "hey, we got your request, we'll get back to you" and then wait for the cancel procedure to finish.

But while this makes sense for a lock that is stuck doing e.g. writeout of pages, sometimes locks are stuck as canceling because they are caught in lru cleanup or whatever other reasons (which seems particularly common when the server latency is high).

It looks like returning EINVAL for such locks (as if it was already fully canceled and the AST just lost the race) for PR/CR and also potentially PW locks with discard dirty data flag set (though this one is tricky since the writeout might have been originated already before this flag was delivered? perhaps once we have server side enforcement of valid lock coverage and rejecting all writes without a lock that'd be safe?) would speed up other clients that wanted to get this lock to do whatever it is they need doing.

Extra wrinkle here is that the ldlm_handle_bl_callback() is called after we ship the reply so some additional potentially not very trivial code rearrangement might need to happen to make such a reply feasible unless we just do it simplistically upfront once the lock handle to lock was matched.



 Comments   
Comment by Andreas Dilger [ 11/Jul/22 ]

Is this really a major win? The only time that discard dirty is used is when the object is being deleted, so there shouldn't be much contention on that lock... I guess it would speed up the other writers if the data was being deleted, but I'm not sure if this happens often enough to make a difference?

Generated at Sat Feb 10 03:23:09 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.