[LU-12930] use schedule_timeout_{un,}interruptible where possible. Created: 04/Nov/19 Updated: 14/Feb/20 Resolved: 14/Feb/20 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.14.0 |
| Type: | Improvement | Priority: | Minor |
| Reporter: | Neil Brown | Assignee: | Neil Brown |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||
| Rank (Obsolete): | 9223372036854775807 | ||||||||||||
| Description |
|
The construct:
set_current_state(TASK_UNINTERRUPTIABLE); schedule_timeout(time); Is more clearly expressed as schedule_timeout_uninterruptible(time); And similarly with TASK_INTERRUPTIBLE / schedule_timeout_interruptible() Establishing this practice makes it harder to forget to call set_current_state() as has happened a couple of times - in lnet_peer_discovery and mdd_changelog_fini(). Also, there is no need to set_current_state(TASK_RUNNABLE) after calling schedule*(). That state is guaranteed to have been set.
|
| Comments |
| Comment by James A Simmons [ 03/Feb/20 ] |
| Comment by Gerrit Updater [ 14/Feb/20 ] |
|
Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/36656/ |
| Comment by Peter Jones [ 14/Feb/20 ] |
|
Landed for 2.14 |