Re: [PATCH v3] mm: memory: fix /proc/meminfo reporting for MLOCK_ONFAULT

2019-09-23 Thread Michal Hocko
On Tue 17-09-19 14:35:50, Kirill A. Shutemov wrote: > On Tue, Sep 17, 2019 at 12:15:19PM +0200, Michal Hocko wrote: > > On Mon 16-09-19 18:26:19, Kirill A. Shutemov wrote: > > > On Fri, Sep 13, 2019 at 02:11:19PM -0700, Lucian Adrian Grijincu wrote: > > > > As pages are faulted in MLOCK_ONFAULT cor

Re: [PATCH v3] mm: memory: fix /proc/meminfo reporting for MLOCK_ONFAULT

2019-09-17 Thread Kirill A. Shutemov
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 @@

Re: [PATCH v3] mm: memory: fix /proc/meminfo reporting for MLOCK_ONFAULT

2019-09-17 Thread Kirill A. Shutemov
On Tue, Sep 17, 2019 at 12:15:19PM +0200, Michal Hocko wrote: > On Mon 16-09-19 18:26:19, Kirill A. Shutemov wrote: > > On Fri, Sep 13, 2019 at 02:11:19PM -0700, Lucian Adrian Grijincu wrote: > > > As pages are faulted in MLOCK_ONFAULT correctly updates > > > /proc/self/smaps, but doesn't update /p

Re: [PATCH v3] mm: memory: fix /proc/meminfo reporting for MLOCK_ONFAULT

2019-09-17 Thread Michal Hocko
On Mon 16-09-19 18:26:19, Kirill A. Shutemov wrote: > On Fri, Sep 13, 2019 at 02:11:19PM -0700, Lucian Adrian Grijincu wrote: > > As pages are faulted in MLOCK_ONFAULT correctly updates > > /proc/self/smaps, but doesn't update /proc/meminfo's Mlocked field. > > I don't think there's something wron

Re: [PATCH v3] mm: memory: fix /proc/meminfo reporting for MLOCK_ONFAULT

2019-09-16 Thread Lucian Grijincu
> On 9/16/19, 04:35, "Michal Hocko" wrote: > > 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,

Re: [PATCH v3] mm: memory: fix /proc/meminfo reporting for MLOCK_ONFAULT

2019-09-16 Thread Kirill A. Shutemov
On Fri, Sep 13, 2019 at 02:11:19PM -0700, Lucian Adrian Grijincu wrote: > As pages are faulted in MLOCK_ONFAULT correctly updates > /proc/self/smaps, but doesn't update /proc/meminfo's Mlocked field. I don't think there's something wrong with this behaviour. It is okay to keep the page an evictabl

Re: [PATCH v3] mm: memory: fix /proc/meminfo reporting for MLOCK_ONFAULT

2019-09-16 Thread Michal Hocko
[Cc Hugh] On Fri 13-09-19 14:11:19, Lucian Adrian Grijincu wrote: > As pages are faulted in MLOCK_ONFAULT correctly updates > /proc/self/smaps, but doesn't update /proc/meminfo's Mlocked field. > > - Before this /proc/meminfo fields didn't change as pages were faulted in: > > = Start = > /proc/m

Re: [Potential Spoof] [PATCH v3] mm: memory: fix /proc/meminfo reporting for MLOCK_ONFAULT

2019-09-13 Thread Roman Gushchin
On Fri, Sep 13, 2019 at 02:11:19PM -0700, Lucian Adrian Grijincu wrote: > As pages are faulted in MLOCK_ONFAULT correctly updates > /proc/self/smaps, but doesn't update /proc/meminfo's Mlocked field. > > - Before this /proc/meminfo fields didn't change as pages were faulted in: > > = Start = > /p

[PATCH v3] mm: memory: fix /proc/meminfo reporting for MLOCK_ONFAULT

2019-09-13 Thread Lucian Adrian Grijincu
As pages are faulted in MLOCK_ONFAULT correctly updates /proc/self/smaps, but doesn't update /proc/meminfo's Mlocked field. - Before this /proc/meminfo fields didn't change as pages were faulted in: = Start = /proc/meminfo Unevictable: 10128 kB Mlocked: 10132 kB = Creating testfil