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
  • trace
  • ring_buffer.c
Find file BlameHistoryPermalink
  • Zheng Yejian's avatar
    ring-buffer: Avoid softlockup in ring_buffer_resize() · f6bd2c92
    Zheng Yejian authored Sep 06, 2023
    When user resize all trace ring buffer through file 'buffer_size_kb',
    then in ring_buffer_resize(), kernel allocates buffer pages for each
    cpu in a loop.
    
    If the kernel preemption model is PREEMPT_NONE and there are many cpus
    and there are many buffer pages to be allocated, it may not give up cpu
    for a long time and finally cause a softlockup.
    
    To avoid it, call cond_resched() after each cpu buffer allocation.
    
    Link: https://lore.kernel.org/linux-trace-kernel/20230906081930.3939106-1-zhengyejian1@huawei.com
    
    
    
    Cc: <mhiramat@kernel.org>
    Signed-off-by: default avatarZheng Yejian <zhengyejian1@huawei.com>
    Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
    f6bd2c92
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7