Re: [PATCH] mm: Reduce memory bloat with THP

From: Kirill A. Shutemov
Date: Fri Dec 15 2017 - 05:02:00 EST


On Thu, Dec 14, 2017 at 05:28:52PM -0800, Nitin Gupta wrote:
> diff --git a/mm/madvise.c b/mm/madvise.c
> index 751e97a..b2ec07b 100644
> --- a/mm/madvise.c
> +++ b/mm/madvise.c
> @@ -508,6 +508,7 @@ static long madvise_dontneed_single_vma(struct vm_area_struct *vma,
> unsigned long start, unsigned long end)
> {
> zap_page_range(vma, start, end - start);
> + vma->space_efficient = true;
> return 0;
> }
>

And this modifies vma without down_write(mmap_sem).

No.

--
Kirill A. Shutemov