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

use schedule_timeout_{un,}interruptible where possible.

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • Lustre 2.14.0
    • None
    • None
    • 9223372036854775807

      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.

       

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

              Created:
              Updated:
              Resolved: