Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-12930

use schedule_timeout_{un,}interruptible where possible.

Details

    • Improvement
    • Resolution: Fixed
    • Minor
    • Lustre 2.14.0
    • None
    • None
    • 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.

       

      Attachments

        Issue Links

          Activity

            [LU-12930] use schedule_timeout_{un,}interruptible where possible.
            pjones Peter Jones added a comment -

            Landed for 2.14

            pjones Peter Jones added a comment - Landed for 2.14

            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

            gerrit Gerrit Updater added a comment - 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
            simmonsja James A Simmons added a comment - https://review.whamcloud.com/#/c/36656/

            People

              neilb Neil Brown
              neilb Neil Brown
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: