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
You need to sign in or sign up before continuing.
  • linux
  • kernel
  • locking
  • rtmutex.c
Find file BlameHistoryPermalink
  • Thomas Gleixner's avatar
    sched: Handle priority boosted tasks proper in setscheduler() · 0782e63b
    Thomas Gleixner authored May 05, 2015
    Ronny reported that the following scenario is not handled correctly:
    
    	T1 (prio = 10)
    	   lock(rtmutex);
    
    	T2 (prio = 20)
    	   lock(rtmutex)
    	      boost T1
    
    	T1 (prio = 20)
    	   sys_set_scheduler(prio = 30)
    	   T1 prio = 30
    	   ....
    	   sys_set_scheduler(prio = 10)
    	   T1 prio = 30
    
    The last step is wrong as T1 should now be back at prio 20.
    
    Commit c365c292
    
     ("sched: Consider pi boosting in setscheduler()")
    only handles the case where a boosted tasks tries to lower its
    priority.
    
    Fix it by taking the new effective priority into account for the
    decision whether a change of the priority is required.
    
    Reported-by: default avatarRonny Meeus <ronny.meeus@gmail.com>
    Tested-by: default avatarSteven Rostedt <rostedt@goodmis.org>
    Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
    Reviewed-by: default avatarSteven Rostedt <rostedt@goodmis.org>
    Cc: <stable@vger.kernel.org>
    Cc: Borislav Petkov <bp@alien8.de>
    Cc: H. Peter Anvin <hpa@zytor.com>
    Cc: Mike Galbraith <umgwanakikbuti@gmail.com>
    Fixes: c365c292 ("sched: Consider pi boosting in setscheduler()")
    Link: http://lkml.kernel.org/r/alpine.DEB.2.11.1505051806060.4225@nanos
    
    
    Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
    0782e63b
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7