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 (VMware)'s avatar
    ring-buffer: Don't deactivate the ring buffer on failed iterator reads · 3d2353de
    Steven Rostedt (VMware) authored May 13, 2020
    If the function tracer is running and the trace file is read (which uses the
    ring buffer iterator), the iterator can get in sync with the writes, and
    caues it to fail to find a page with content it can read three times. This
    causes a warning and deactivation of the ring buffer code.
    
    Looking at the other cases of failure to get an event, it appears that
    there's a chance that the writer could cause them too. Since the iterator is
    a "best effort" to read the ring buffer if there's an active writer (the
    consumer reader is made for this case "see trace_pipe"), if it fails to get
    an event after three tries, simply give up and return NULL. Don't warn, nor
    disable the ring buffer on this failure.
    
    Link: https://lore.kernel.org/r/20200429090508.GG5770@shao2-debian
    
    
    
    Reported-by: default avatarkernel test robot <lkp@intel.com>
    Fixes: ff84c50c
    
     ("ring-buffer: Do not die if rb_iter_peek() fails more than thrice")
    Tested-by: default avatarSven Schnelle <svens@linux.ibm.com>
    Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
    3d2353de
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7