[LU-14352] Only use wake_up_all when necessary Created: 21/Jan/21  Updated: 21/Apr/21  Resolved: 21/Apr/21

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

Type: Improvement Priority: Minor
Reporter: Neil Brown Assignee: Neil Brown
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Related
is related to LU-12511 Prepare lustre for adoption into the ... Open
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 Gerrit Updater [ 21/Jan/21 ]

Neil Brown (neilb@suse.de) uploaded a new patch: https://review.whamcloud.com/41289
Subject: LU-14352 various: only use wake_up_all() on exclusive waitqs
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 2187f483d7441d368c343e02b634fa6c498b97c9

Comment by Gerrit Updater [ 21/Apr/21 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/41289/
Subject: LU-14352 various: only use wake_up_all() on exclusive waitqs
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 1f4e9f0f4f483dc93cbecdc841740bc11ec59a73

Comment by Peter Jones [ 21/Apr/21 ]

Landed for 2.15

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