Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1491153

Re: [PATCH v3 1/2] mm, proc: Fix region lost in /proc/self/smaps

From Michal Hocko <mhocko@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH v3 1/2] mm, proc: Fix region lost in /proc/self/smaps
Date 2016-09-26 10:50 +0200
Message-ID <slzLP-1BO-5@gated-at.bofh.it> (permalink)
References <skyyt-47t-19@gated-at.bofh.it> <skzbc-4lr-35@gated-at.bofh.it> <skA7g-5af-21@gated-at.bofh.it> <skB3j-5Jn-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri 23-09-16 17:53:51, Oleg Nesterov wrote:
> On 09/23, Michal Hocko wrote:
> >
> > On Fri 23-09-16 15:56:36, Oleg Nesterov wrote:
> > > 
> > > I think we can simplify this patch. And imo make it better. How about
> > 
> > it is certainly less subtle because it doesn't report "sub-vmas".
> > 
> > > 	if (last_addr) {
> > > 		vma = find_vma(mm, last_addr - 1);
> > > 		if (vma && vma->vm_start <= last_addr)
> > > 			vma = m_next_vma(priv, vma);
> > > 		if (vma)
> > > 			return vma;
> > > 	}
> > 
> > we would still miss a VMA if the last one got shrunk/split
> 
> Not sure I understand what you mean... If the last one was split
> we probably should not report the new vma.

Right, VMA split is less of a problem. I meant to say that if the
last_vma->vm_end got lower for whatever reason then we could miss a VMA
right after. We actually might want to display such a VMA because it
could be a completely new one. We just do not know whether it is a
former split with enlarged VMA or a completely new one

[      old VMA     ]   Hole       [   VMA    ]
[ old VMA   ][  New VMa    ]      [   VMA    ]

> Nevermind, in any case yes, sure, this can't "fix" other corner cases.

Agreed, or at least I do not see an easy way for that.
-- 
Michal Hocko
SUSE Labs

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3 1/2] mm, proc: Fix region lost in /proc/self/smaps Robert Ho <robert.hu@intel.com> - 2016-09-23 15:20 +0200
  [PATCH v3 2/2] Documentation/filesystems/proc.txt: Add more description for maps/smaps Robert Ho <robert.hu@intel.com> - 2016-09-23 15:20 +0200
    Re: [PATCH v3 2/2] Documentation/filesystems/proc.txt: Add more  description for maps/smaps Dave Hansen <dave.hansen@intel.com> - 2016-09-23 18:10 +0200
  Re: [PATCH v3 1/2] mm, proc: Fix region lost in /proc/self/smaps Michal Hocko <mhocko@kernel.org> - 2016-09-23 16:00 +0200
    Re: [PATCH v3 1/2] mm, proc: Fix region lost in /proc/self/smaps Michal Hocko <mhocko@kernel.org> - 2016-09-23 16:40 +0200
  Re: [PATCH v3 1/2] mm, proc: Fix region lost in /proc/self/smaps Oleg Nesterov <oleg@redhat.com> - 2016-09-23 16:00 +0200
    Re: [PATCH v3 1/2] mm, proc: Fix region lost in /proc/self/smaps Michal Hocko <mhocko@kernel.org> - 2016-09-23 17:00 +0200
      Re: [PATCH v3 1/2] mm, proc: Fix region lost in /proc/self/smaps Oleg Nesterov <oleg@redhat.com> - 2016-09-23 18:00 +0200
        Re: [PATCH v3 1/2] mm, proc: Fix region lost in /proc/self/smaps Michal Hocko <mhocko@kernel.org> - 2016-09-26 10:50 +0200
          Re: [PATCH v3 1/2] mm, proc: Fix region lost in /proc/self/smaps Michal Hocko <mhocko@kernel.org> - 2016-09-29 15:50 +0200

csiph-web