From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: Oleg Nesterov <oleg@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
Cyrill Gorcunov <gorcunov@gmail.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: /proc/pid/clear_refs: no need to clear VM_SOFTDIRTY in clear_soft_dirty_pmd()
Date: Wed, 16 Dec 2015 19:43:49 +0200 [thread overview]
Message-ID: <20151216174348.GA19144@node.shutemov.name> (raw)
In-Reply-To: <20151216172632.GA7589@redhat.com>
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 <oleg@redhat.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> ---
> 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 majordomo@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
next prev parent reply other threads:[~2015-12-16 17:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-16 17:26 [PATCH] mm: /proc/pid/clear_refs: no need to clear VM_SOFTDIRTY in clear_soft_dirty_pmd() Oleg Nesterov
2015-12-16 17:43 ` Kirill A. Shutemov [this message]
2015-12-16 17:51 ` Cyrill Gorcunov
2015-12-22 21:59 ` David Rientjes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151216174348.GA19144@node.shutemov.name \
--to=kirill@shutemov.name \
--cc=akpm@linux-foundation.org \
--cc=gorcunov@gmail.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=n-horiguchi@ah.jp.nec.com \
--cc=oleg@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox