[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:
Related
is related to LU-12511 Prepare lustre for adoption into the ... Open
is related to LU-9019 Migrate lustre to standard 64 bit tim... Resolved
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 ]

https://review.whamcloud.com/#/c/36656/

Comment by Gerrit Updater [ 14/Feb/20 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/36656/
Subject: LU-12930 various: use schedule_timeout_*interruptible
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 5c883ea2748ae9e430a9cd863a9b630b2a74440a

Comment by Peter Jones [ 14/Feb/20 ]

Landed for 2.14

Generated at Sat Feb 10 02:56:53 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.