[LU-14350] Only use wake_up_all() when necessary Created: 21/Jan/21  Updated: 22/Mar/22  Resolved: 22/Mar/22

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

Type: Improvement Priority: Minor
Reporter: Neil Brown Assignee: WC Triage
Resolution: Duplicate Votes: 0
Labels: None

Rank (Obsolete): 9223372036854775807

 Description   

wake_up_all() is only needed when there are threads doing an exclusive wait.

wake_up() will wake up all non-exclusive threads, and at most one exclusive thread.  When non-exclusive waits are used, it is sufficient and preferred to use wake_up() to  wake them up.

wake_up_all() should be reserved for those cases where threads are waiting exclusively, and they all want to be woken up.  Keeping it for the purpose only improve code readability.

 



 Comments   
Comment by Peter Jones [ 22/Mar/22 ]

Seems to be duplicate of LU-14351

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