diff options
| author | Oleg Nesterov <oleg@redhat.com> | 2014-10-09 15:25:41 -0700 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2016-09-28 15:15:13 +0200 |
| commit | 7a6a1025f836bfa0fdf7fef7240fdf295a46372d (patch) | |
| tree | 915aae24ea6471ee3a389180185e72fc741244de /kernel | |
| parent | 08b29b79c414d1122686d221bcfe9f5ae6c4ef84 (diff) | |
fs/proc/task_mmu.c: reintroduce m->version logic
Add the "last_addr" optimization back. Like before, every ->show()
method checks !seq_overflow() and sets m->version = vma->vm_start.
However, it also checks that m_next_vma(vma) != NULL, otherwise it
sets m->version = -1 for the lockless "EOF" fast-path in m_start().
m_start() can simply do find_vma() + m_next_vma() if last_addr is
not zero, the code looks clear and simple and this case is clearly
separated from "scan vmas" path.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: W4TCH0UT <ateekujjawal@gmail.com>
Conflicts:
fs/proc/task_mmu.c
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions
