Messages in this thread | | | Date | Wed, 17 Dec 2014 11:32:49 -0500 | From | Rik van Riel <> | Subject | Re: [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.
| |