Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
  • linux
  • kernel
  • time
  • timer.c
Find file BlameHistoryPermalink
  • Alexander Popov's avatar
    timer: Improve the comment describing schedule_timeout() · 6e317c32
    Alexander Popov authored Jan 18, 2020
    When working commit 6dcd5d7a
    
    , a mistake was noticed by Linus:
    schedule_timeout() was called without setting the task state to anything
    particular.
    
    It calls the scheduler, but doesn't delay anything, because the task stays
    runnable. That happens because sched_submit_work() does nothing for tasks
    in TASK_RUNNING state.
    
    That turned out to be the intended behavior. Adding a WARN() is not useful
    as the task could be woken up right after setting the state and before
    reaching schedule_timeout().
    
    Improve the comment about schedule_timeout() and describe that more
    explicitly.
    
    Signed-off-by: default avatarAlexander Popov <alex.popov@linux.com>
    Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    Link: https://lkml.kernel.org/r/20200117225900.16340-1-alex.popov@linux.com
    
    6e317c32
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7