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
  • lib
  • maple_tree.c
Find file BlameHistoryPermalink
  • Liam R. Howlett's avatar
    maple_tree: reorder replacement of nodes to avoid live lock · 72bcf4aa
    Liam R. Howlett authored Aug 04, 2023
    Replacing nodes may cause a live lock-up if CPU resources are saturated by
    write operations on the tree by continuously retrying on dead nodes.  To
    avoid the continuous retry scenario, ensure the new node is inserted into
    the tree prior to marking the old data as dead.  This will define a window
    where old and new data is swapped.
    
    When reusing lower level nodes, ensure the parent pointer is updated after
    the parent is marked dead.  This ensures that the child is still reachable
    from the top of the tree, but walking up to a dead node will result in a
    single retry that will start a fresh walk from the top down through the
    new node.
    
    Link: https://lkml.kernel.org/r/20230804165951.2661157-3-Liam.Howlett@oracle.com
    
    
    Signed-off-by: default avatarLiam R. Howlett <Liam.Howlett@oracle.com>
    Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
    Cc: Paul E. McKenney <paulmck@kernel.org>
    Cc: Suren Baghdasaryan <surenb@google.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    72bcf4aa
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7