[LU-5397] optimize busy loop waiting in class_cleanup() Created: 23/Jul/14 Updated: 26/Jul/14 Resolved: 26/Jul/14 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.7.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Alexander Zarochentsev | Assignee: | WC Triage |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | patch | ||
| Severity: | 3 |
| Rank (Obsolete): | 15022 |
| Description |
|
the following code from class_cleanup(): /* wait for already-arrived-connections to finish. */ while (obd->obd_conn_inprogress > 0) { spin_unlock(&obd->obd_dev_lock); cond_resched(); spin_lock(&obd->obd_dev_lock); } spin_unlock(&obd->obd_dev_lock); contains at least two defects (if not going to substitute busy loop waiting by another more suitable synchronisation mechanism) :
|
| Comments |
| Comment by Alexander Zarochentsev [ 23/Jul/14 ] |
|
proposed fix http://review.whamcloud.com/#/c/11198/ |
| Comment by Alexander Zarochentsev [ 23/Jul/14 ] |
|
patch updated to have memory barrier instead of spinlocks. |
| Comment by Peter Jones [ 26/Jul/14 ] |
|
Landed for 2.7 |