[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190917113758.kfcbagaz7nlbqnco@box>
Date: Tue, 17 Sep 2019 14:37:58 +0300
From: "Kirill A. Shutemov" <kirill@...temov.name>
To: Lucian Adrian Grijincu <lucian@...com>
Cc: linux-mm@...ck.org, Souptick Joarder <jrdr.linux@...il.com>,
linux-kernel@...r.kernel.org, Michal Hocko <mhocko@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Rik van Riel <riel@...com>, Roman Gushchin <guro@...com>
Subject: Re: [PATCH v3] mm: memory: fix /proc/meminfo reporting for
MLOCK_ONFAULT
On Mon, Sep 16, 2019 at 06:26:19PM +0300, Kirill A. Shutemov wrote:
> > ---
> > mm/memory.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/mm/memory.c b/mm/memory.c
> > index e0c232fe81d9..55da24f33bc4 100644
> > --- a/mm/memory.c
> > +++ b/mm/memory.c
> > @@ -3311,6 +3311,8 @@ vm_fault_t alloc_set_pte(struct vm_fault *vmf, struct mem_cgroup *memcg,
> > } else {
> > inc_mm_counter_fast(vma->vm_mm, mm_counter_file(page));
> > page_add_file_rmap(page, false);
> > + if (vma->vm_flags & VM_LOCKED && !PageTransCompound(page))
> > + mlock_vma_page(page);
>
> Why do you only do this for file pages?
Because file pages are locked already, right?
--
Kirill A. Shutemov
Powered by blists - more mailing lists