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
You need to sign in or sign up before continuing.
  • linux
  • kernel
  • trace
  • ring_buffer.c
Find file BlameHistoryPermalink
  • Vincent Donnefort's avatar
    ring-buffer: Introducing ring-buffer mapping functions · 117c3920
    Vincent Donnefort authored May 10, 2024
    In preparation for allowing the user-space to map a ring-buffer, add
    a set of mapping functions:
    
      ring_buffer_{map,unmap}()
    
    And controls on the ring-buffer:
    
      ring_buffer_map_get_reader()  /* swap reader and head */
    
    Mapping the ring-buffer also involves:
    
      A unique ID for each subbuf of the ring-buffer, currently they are
      only identified through their in-kernel VA.
    
      A meta-page, where are stored ring-buffer statistics and a
      description for the current reader
    
    The linear mapping exposes the meta-page, and each subbuf of the
    ring-buffer, ordered following their unique ID, assigned during the
    first mapping.
    
    Once mapped, no subbuf can get in or out of the ring-buffer: the buffer
    size will remain unmodified and the splice enabling functions will in
    reality simply memcpy the data instead of swapping subbufs.
    
    Link: https://lore.kernel.org/linux-trace-kernel/20240510140435.3550353-3-vdonnefort@google.com
    
    
    
    CC: <linux-mm@kvack.org>
    Signed-off-by: default avatarVincent Donnefort <vdonnefort@google.com>
    Acked-by: default avatarDavid Hildenbrand <david@redhat.com>
    Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
    117c3920
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7