[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: |
|
||||||||
| 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 |
| Comment by Gerrit Updater [ 21/Apr/21 ] |
|
Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/41289/ |
| Comment by Peter Jones [ 21/Apr/21 ] |
|
Landed for 2.15 |