Re: [PATCH v2] mm, proc: Fix region lost in /proc/self/smaps

2016-09-19 Thread Xiao Guangrong
On 09/14/2016 11:38 PM, Oleg Nesterov wrote: On 09/13, Dave Hansen wrote: On 09/13/2016 07:59 AM, Oleg Nesterov wrote: I agree. I don't even understand why this was considered as a bug. Obviously, m_stop() which drops mmap_sep should not be called, or all the threads should be stopped, if yo

Re: [PATCH v2] mm, proc: Fix region lost in /proc/self/smaps

2016-09-14 Thread Oleg Nesterov
On 09/13, Dave Hansen wrote: > > On 09/13/2016 07:59 AM, Oleg Nesterov wrote: > > I agree. I don't even understand why this was considered as a bug. > > Obviously, m_stop() which drops mmap_sep should not be called, or > > all the threads should be stopped, if you want to trust the result. > > Ther

Re: [PATCH v2] mm, proc: Fix region lost in /proc/self/smaps

2016-09-13 Thread Dave Hansen
On 09/13/2016 07:59 AM, Oleg Nesterov wrote: > On 09/12, Michal Hocko wrote: >> > Considering how this all can be tricky and how partial reads can be >> > confusing and even misleading I am really wondering whether we >> > should simply document that only full reads will provide a sensible >> > res

Re: [PATCH v2] mm, proc: Fix region lost in /proc/self/smaps

2016-09-13 Thread Oleg Nesterov
On 09/12, Michal Hocko wrote: > > Considering how this all can be tricky and how partial reads can be > confusing and even misleading I am really wondering whether we > should simply document that only full reads will provide a sensible > results. I agree. I don't even understand why this was cons

Re: [PATCH v2] mm, proc: Fix region lost in /proc/self/smaps

2016-09-12 Thread Xiao Guangrong
On 09/13/2016 03:10 AM, Michal Hocko wrote: On Mon 12-09-16 08:01:06, Dave Hansen wrote: On 09/12/2016 05:54 AM, Michal Hocko wrote: In order to fix this bug, we make 'file->version' indicate the end address of current VMA Doesn't this open doors to another weird cases. Say B would be partia

Re: [PATCH v2] mm, proc: Fix region lost in /proc/self/smaps

2016-09-12 Thread Michal Hocko
On Mon 12-09-16 08:01:06, Dave Hansen wrote: > On 09/12/2016 05:54 AM, Michal Hocko wrote: > >> > In order to fix this bug, we make 'file->version' indicate the end > >> > address > >> > of current VMA > > Doesn't this open doors to another weird cases. Say B would be partially > > unmapped (tail

Re: [PATCH v2] mm, proc: Fix region lost in /proc/self/smaps

2016-09-12 Thread Dave Hansen
On 09/12/2016 05:54 AM, Michal Hocko wrote: >> > In order to fix this bug, we make 'file->version' indicate the end address >> > of current VMA > Doesn't this open doors to another weird cases. Say B would be partially > unmapped (tail of the VMA would get unmapped and reused for a new VMA. In the

Re: [PATCH v2] mm, proc: Fix region lost in /proc/self/smaps

2016-09-12 Thread Michal Hocko
[Cc Oleg - he seemed to touch it the last. Keeping the whole email for reference with a comment inline] On Mon 12-09-16 11:12:44, Xiao Guangrong wrote: > Recently, Redhat reported that nvml test suite failed on QEMU/KVM, > more detailed info please refer to: >https://bugzilla.redhat.com/show_b