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
  • hung_task.c
Find file BlameHistoryPermalink
  • Tetsuo Handa's avatar
    kernel/hung_task.c: defer showing held locks · 780cbcf2
    Tetsuo Handa authored May 08, 2017
    When I was running my testcase which may block hundreds of threads on fs
    locks, I got lockup due to output from debug_show_all_locks() added by
    commit b2d4c2ed ("locking/hung_task: Show all locks").
    
    For example, if 1000 threads were blocked in TASK_UNINTERRUPTIBLE state
    and 500 out of 1000 threads hold some lock, debug_show_all_locks() from
    for_each_process_thread() loop will report locks held by 500 threads for
    1000 times.  This is a too much noise.
    
    In order to make sure rcu_lock_break() is called frequently, we should
    avoid calling debug_show_all_locks() from for_each_process_thread() loop
    because debug_show_all_locks() effectively calls for_each_process_thread()
    loop.  Let's defer calling debug_show_all_locks() till before panic() or
    leaving for_each_process_thread() loop.
    
    Link: http://lkml.kernel.org/r/1489296834-60436-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp
    
    
    Signed-off-by: default avatarTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
    Reviewed-by: default avatarVegard Nossum <vegard.nossum@oracle.com>
    Cc: Ingo Molnar <mingo@kernel.org>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    780cbcf2
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7