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
  • Steven Rostedt (Google)'s avatar
    ring-buffer: Use wait_event_interruptible() in ring_buffer_wait() · 7af9ded0
    Steven Rostedt (Google) authored Mar 12, 2024
    Convert ring_buffer_wait() over to wait_event_interruptible(). The default
    condition is to execute the wait loop inside __wait_event() just once.
    
    This does not change the ring_buffer_wait() prototype yet, but
    restructures the code so that it can take a "cond" and "data" parameter
    and will call wait_event_interruptible() with a helper function as the
    condition.
    
    The helper function (rb_wait_cond) takes the cond function and data
    parameters. It will first check if the buffer hit the watermark defined by
    the "full" parameter and then call the passed in condition parameter. If
    either are true, it returns true.
    
    If rb_wait_cond() does not return true, it will set the appropriate
    "waiters_pending" flag and returns false.
    
    Link: https://lore.kernel.org/linux-trace-kernel/CAHk-=wgsNgewHFxZAJiAQznwPMqEtQmi1waeS2O1v6L4c_Um5A@mail.gmail.com/
    Link: https://lore.kernel.org/linux-trace-kernel/20240312121703.399598519@goodmis.org
    
    Cc: stable@vger.kernel.org
    Cc: Masami Hiramatsu <mhiramat@kernel.org>
    Cc: Mark Rutland <mark.rutland@arm.com>
    Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: linke li <lilinke99@qq.com>
    Cc: Rabin Vincent <rabin@rab.in>
    Fixes: f3ddb74a
    
     ("tracing: Wake up ring buffer waiters on closing of the file")
    Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
    7af9ded0
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7