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
  • lib
  • dump_stack.c
Find file BlameHistoryPermalink
  • Kevin Hao's avatar
    dump_stack: avoid the livelock of the dump_lock · 5cbf2fff
    Kevin Hao authored Nov 05, 2019
    In the current code, we use the atomic_cmpxchg() to serialize the output
    of the dump_stack(), but this implementation suffers the thundering herd
    problem.  We have observed such kind of livelock on a Marvell cn96xx
    board(24 cpus) when heavily using the dump_stack() in a kprobe handler.
    Actually we can let the competitors to wait for the releasing of the
    lock before jumping to atomic_cmpxchg().  This will definitely mitigate
    the thundering herd problem.  Thanks Linus for the suggestion.
    
    [akpm@linux-foundation.org: fix comment]
    Link: http://lkml.kernel.org/r/20191030031637.6025-1-haokexin@gmail.com
    Fixes: b58d9774
    
     ("dump_stack: serialize the output from dump_stack()")
    Signed-off-by: default avatarKevin Hao <haokexin@gmail.com>
    Suggested-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    5cbf2fff
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7