lkml.org 
[lkml]   [2014]   [Dec]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4] mm: prevent endless growth of anon_vma hierarchy
On 12/17/2014 02:57 AM, Konstantin Khlebnikov wrote:

> @@ -236,6 +240,13 @@ static inline void unlock_anon_vma_root(struct anon_vma *root)
> /*
> * Attach the anon_vmas from src to dst.
> * Returns 0 on success, -ENOMEM on failure.
> + *
> + * If dst->anon_vma is NULL this function tries to find and reuse existing
> + * anon_vma which has no vmas and only one child anon_vma. This prevents
> + * degradation of anon_vma hierarchy to endless linear chain in case of
> + * constantly forking task. In other hand anon_vma with more than one child
> + * isn't reused even if was no alive vma, thus rmap walker has a good chance
> + * to avoid scanning whole hieraryhy when it searches where page is mapped.
^^^^^^^^^
hierarchy

Other than that:

Reviewed-by: Rik van Riel <riel@redhat.com>


Thanks for fixing this long standing issue, Konstantin.


\
 
 \ /
  Last update: 2014-12-17 18:01    [W:0.045 / U:0.556 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site