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
  • task_work.c
Find file BlameHistoryPermalink
  • Oleg Nesterov's avatar
    task_work_run: don't take ->pi_lock unconditionally · 6fb61492
    Oleg Nesterov authored Feb 18, 2020
    
    
    As Peter pointed out, task_work() can avoid ->pi_lock and cmpxchg()
    if task->task_works == NULL && !PF_EXITING.
    
    And in fact the only reason why task_work_run() needs ->pi_lock is
    the possible race with task_work_cancel(), we can optimize this code
    and make the locking more clear.
    
    Signed-off-by: default avatarOleg Nesterov <oleg@redhat.com>
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    6fb61492
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7