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
  • Corey Minyard's avatar
    ring-buffer: Always run per-cpu ring buffer resize with schedule_work_on() · 171ba055
    Corey Minyard authored Jul 16, 2014
    commit 021c5b34 upstream.
    
    The code for resizing the trace ring buffers has to run the per-cpu
    resize on the CPU itself.  The code was using preempt_off() and
    running the code for the current CPU directly, otherwise calling
    schedule_work_on().
    
    At least on RT this could result in the following:
    
    |BUG: sleeping function called from invalid context at kernel/rtmutex.c:673
    |in_atomic(): 1, irqs_disabled(): 0, pid: 607, name: bash
    |3 locks held by bash/607:
    |CPU: 0 PID: 607 Comm: bash Not tainted 3.12.15-rt25+ #124
    |(rt_spin_lock+0x28/0x68)
    |(free_hot_cold_page+0x84/0x3b8)
    |(free_buffer_page+0x14/0x20)
    |(rb_update_pages+0x280/0x338)
    |(ring_buffer_resize+0x32c/0x3dc)
    |(free_snapshot+0x18/0x38)
    |(tracing_set_tracer+0x27c/0x2ac)
    
    probably via
    |cd /sys/kernel/debug/tracing/
    |echo 1 > events/enable ; sleep 2
    |echo 1024 > buffer_size_kb
    
    If we just always use schedule_work_on(), there's no need for the
    preempt_off().  So do that.
    
    Link: http://lkml.kernel.org/p/1405537633-31518-1-git-send-email-cminyard@mvista.com
    
    
    
    Reported-by: default avatarStanislav Meduna <stano@meduna.org>
    Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
    Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
    Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
    171ba055
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7