Re: [PATCH] mm: /proc/pid/clear_refs: no need to clear VM_SOFTDIRTY in clear_soft_dirty_pmd()
On Wed, 16 Dec 2015, Oleg Nesterov wrote: > clear_soft_dirty_pmd() is called by clear_refs_write(CLEAR_REFS_SOFT_DIRTY), > VM_SOFTDIRTY was already cleared before walk_page_range(). > > Signed-off-by: Oleg Nesterov Acked-by: David Rientjes -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] mm: /proc/pid/clear_refs: no need to clear VM_SOFTDIRTY in clear_soft_dirty_pmd()
On Wed, 16 Dec 2015, Oleg Nesterov wrote: > clear_soft_dirty_pmd() is called by clear_refs_write(CLEAR_REFS_SOFT_DIRTY), > VM_SOFTDIRTY was already cleared before walk_page_range(). > > Signed-off-by: Oleg NesterovAcked-by: David Rientjes -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] mm: /proc/pid/clear_refs: no need to clear VM_SOFTDIRTY in clear_soft_dirty_pmd()
On Wed, Dec 16, 2015 at 06:26:32PM +0100, Oleg Nesterov wrote: > clear_soft_dirty_pmd() is called by clear_refs_write(CLEAR_REFS_SOFT_DIRTY), > VM_SOFTDIRTY was already cleared before walk_page_range(). > > Signed-off-by: Oleg Nesterov Acked-by: Cyrill Gorcunov Thank you! -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] mm: /proc/pid/clear_refs: no need to clear VM_SOFTDIRTY in clear_soft_dirty_pmd()
On Wed, Dec 16, 2015 at 06:26:32PM +0100, Oleg Nesterov wrote: > clear_soft_dirty_pmd() is called by clear_refs_write(CLEAR_REFS_SOFT_DIRTY), > VM_SOFTDIRTY was already cleared before walk_page_range(). Not only that, We shouldn't [generally] change vm_flags without exclusive mmap_sem and we have only down_read() here. > Signed-off-by: Oleg Nesterov Acked-by: Kirill A. Shutemov > --- > fs/proc/task_mmu.c |3 --- > 1 files changed, 0 insertions(+), 3 deletions(-) > > diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c > index 187b3b5..1a02b15 100644 > --- a/fs/proc/task_mmu.c > +++ b/fs/proc/task_mmu.c > @@ -817,9 +817,6 @@ static inline void clear_soft_dirty_pmd(struct > vm_area_struct *vma, > pmd = pmd_wrprotect(pmd); > pmd = pmd_clear_soft_dirty(pmd); > > - if (vma->vm_flags & VM_SOFTDIRTY) > - vma->vm_flags &= ~VM_SOFTDIRTY; > - > set_pmd_at(vma->vm_mm, addr, pmdp, pmd); > } > #else > -- > 1.5.5.1 > > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ -- Kirill A. Shutemov -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] mm: /proc/pid/clear_refs: no need to clear VM_SOFTDIRTY in clear_soft_dirty_pmd()
clear_soft_dirty_pmd() is called by clear_refs_write(CLEAR_REFS_SOFT_DIRTY), VM_SOFTDIRTY was already cleared before walk_page_range(). Signed-off-by: Oleg Nesterov --- fs/proc/task_mmu.c |3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 187b3b5..1a02b15 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c @@ -817,9 +817,6 @@ static inline void clear_soft_dirty_pmd(struct vm_area_struct *vma, pmd = pmd_wrprotect(pmd); pmd = pmd_clear_soft_dirty(pmd); - if (vma->vm_flags & VM_SOFTDIRTY) - vma->vm_flags &= ~VM_SOFTDIRTY; - set_pmd_at(vma->vm_mm, addr, pmdp, pmd); } #else -- 1.5.5.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] mm: /proc/pid/clear_refs: no need to clear VM_SOFTDIRTY in clear_soft_dirty_pmd()
clear_soft_dirty_pmd() is called by clear_refs_write(CLEAR_REFS_SOFT_DIRTY), VM_SOFTDIRTY was already cleared before walk_page_range(). Signed-off-by: Oleg Nesterov--- fs/proc/task_mmu.c |3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 187b3b5..1a02b15 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c @@ -817,9 +817,6 @@ static inline void clear_soft_dirty_pmd(struct vm_area_struct *vma, pmd = pmd_wrprotect(pmd); pmd = pmd_clear_soft_dirty(pmd); - if (vma->vm_flags & VM_SOFTDIRTY) - vma->vm_flags &= ~VM_SOFTDIRTY; - set_pmd_at(vma->vm_mm, addr, pmdp, pmd); } #else -- 1.5.5.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] mm: /proc/pid/clear_refs: no need to clear VM_SOFTDIRTY in clear_soft_dirty_pmd()
On Wed, Dec 16, 2015 at 06:26:32PM +0100, Oleg Nesterov wrote: > clear_soft_dirty_pmd() is called by clear_refs_write(CLEAR_REFS_SOFT_DIRTY), > VM_SOFTDIRTY was already cleared before walk_page_range(). > > Signed-off-by: Oleg NesterovAcked-by: Cyrill Gorcunov Thank you! -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] mm: /proc/pid/clear_refs: no need to clear VM_SOFTDIRTY in clear_soft_dirty_pmd()
On Wed, Dec 16, 2015 at 06:26:32PM +0100, Oleg Nesterov wrote: > clear_soft_dirty_pmd() is called by clear_refs_write(CLEAR_REFS_SOFT_DIRTY), > VM_SOFTDIRTY was already cleared before walk_page_range(). Not only that, We shouldn't [generally] change vm_flags without exclusive mmap_sem and we have only down_read() here. > Signed-off-by: Oleg NesterovAcked-by: Kirill A. Shutemov > --- > fs/proc/task_mmu.c |3 --- > 1 files changed, 0 insertions(+), 3 deletions(-) > > diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c > index 187b3b5..1a02b15 100644 > --- a/fs/proc/task_mmu.c > +++ b/fs/proc/task_mmu.c > @@ -817,9 +817,6 @@ static inline void clear_soft_dirty_pmd(struct > vm_area_struct *vma, > pmd = pmd_wrprotect(pmd); > pmd = pmd_clear_soft_dirty(pmd); > > - if (vma->vm_flags & VM_SOFTDIRTY) > - vma->vm_flags &= ~VM_SOFTDIRTY; > - > set_pmd_at(vma->vm_mm, addr, pmdp, pmd); > } > #else > -- > 1.5.5.1 > > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ -- Kirill A. Shutemov -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/