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
  • fork.c
Find file BlameHistoryPermalink
  • Suren Baghdasaryan's avatar
    mm/mmap: free vm_area_struct without call_rcu in exit_mmap · 0d2ebf9c
    Suren Baghdasaryan authored Feb 27, 2023
    call_rcu() can take a long time when callback offloading is enabled.  Its
    use in the vm_area_free can cause regressions in the exit path when
    multiple VMAs are being freed.
    
    Because exit_mmap() is called only after the last mm user drops its
    refcount, the page fault handlers can't be racing with it.  Any other
    possible user like oom-reaper or process_mrelease are already synchronized
    using mmap_lock.  Therefore exit_mmap() can free VMAs directly, without
    the use of call_rcu().
    
    Expose __vm_area_free() and use it from exit_mmap() to avoid possible
    call_rcu() floods and performance regressions caused by it.
    
    Link: https://lkml.kernel.org/r/20230227173632.3292573-33-surenb@google.com
    
    
    Signed-off-by: default avatarSuren Baghdasaryan <surenb@google.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    0d2ebf9c
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7