linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Pavel Emelyanov <xemul@parallels.com>,
	linux-mm@kvack.org, Wu Fengguang <fengguang.wu@intel.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2 v2] smaps: show VM_SOFTDIRTY flag in VmFlags line
Date: Mon, 07 Oct 2013 22:54:54 -0400	[thread overview]
Message-ID: <1381200894-g4p1jfd3-mutt-n-horiguchi@ah.jp.nec.com> (raw)
In-Reply-To: <20131007175125.7bb300853d37b6a64eba248d@linux-foundation.org>

On Mon, Oct 07, 2013 at 05:51:25PM -0700, Andrew Morton wrote:
> On Mon, 07 Oct 2013 10:15:04 -0400 Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> wrote:
> 
> > From: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
> > Date: Fri, 4 Oct 2013 13:42:13 -0400
> > Subject: [PATCH] smaps: show VM_SOFTDIRTY flag in VmFlags line
> > 
> > This flag shows that the VMA is "newly created" and thus represents
> > "dirty" in the task's VM.
> > You can clear it by "echo 4 > /proc/pid/clear_refs."
> > 
> > Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
> > ---
> >  fs/proc/task_mmu.c | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
> > index 7366e9d..c591928 100644
> > --- a/fs/proc/task_mmu.c
> > +++ b/fs/proc/task_mmu.c
> > @@ -561,6 +561,9 @@ static void show_smap_vma_flags(struct seq_file *m, struct vm_area_struct *vma)
> >  		[ilog2(VM_NONLINEAR)]	= "nl",
> >  		[ilog2(VM_ARCH_1)]	= "ar",
> >  		[ilog2(VM_DONTDUMP)]	= "dd",
> > +#ifdef CONFIG_MEM_SOFT_DIRTY
> > +		[ilog2(VM_SOFTDIRTY)]	= "sd",
> > +#endif
> >  		[ilog2(VM_MIXEDMAP)]	= "mm",
> >  		[ilog2(VM_HUGEPAGE)]	= "hg",
> >  		[ilog2(VM_NOHUGEPAGE)]	= "nh",
> 
> Documentation/filesystems/proc.txt needs updating, please.

OK. Here's the revised one.
---
From: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Date: Mon, 7 Oct 2013 22:52:00 -0400
Subject: [PATCH] smaps: show VM_SOFTDIRTY flag in VmFlags line

This flag shows that the VMA is "newly created" and thus represents
"dirty" in the task's VM.
You can clear it by "echo 4 > /proc/pid/clear_refs."

Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
---
 Documentation/filesystems/proc.txt | 1 +
 fs/proc/task_mmu.c                 | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
index 823c95f..22d89aa3 100644
--- a/Documentation/filesystems/proc.txt
+++ b/Documentation/filesystems/proc.txt
@@ -460,6 +460,7 @@ flags associated with the particular virtual memory area in two letter encoded
     nl  - non-linear mapping
     ar  - architecture specific flag
     dd  - do not include area into core dump
+    sd  - soft-dirty flag
     mm  - mixed map area
     hg  - huge page advise flag
     nh  - no-huge page advise flag
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index 7366e9d..c591928 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -561,6 +561,9 @@ static void show_smap_vma_flags(struct seq_file *m, struct vm_area_struct *vma)
 		[ilog2(VM_NONLINEAR)]	= "nl",
 		[ilog2(VM_ARCH_1)]	= "ar",
 		[ilog2(VM_DONTDUMP)]	= "dd",
+#ifdef CONFIG_MEM_SOFT_DIRTY
+		[ilog2(VM_SOFTDIRTY)]	= "sd",
+#endif
 		[ilog2(VM_MIXEDMAP)]	= "mm",
 		[ilog2(VM_HUGEPAGE)]	= "hg",
 		[ilog2(VM_NOHUGEPAGE)]	= "nh",
-- 
1.8.3.1





--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2013-10-08  2:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-04 19:02 [PATCH 1/2] " Naoya Horiguchi
2013-10-04 19:02 ` [PATCH 2/2] page-types.c: support KPF_SOFTDIRTY bit Naoya Horiguchi
2013-10-08  0:50   ` Andrew Morton
2013-10-07 13:21 ` [PATCH 1/2] smaps: show VM_SOFTDIRTY flag in VmFlags line Pavel Emelyanov
2013-10-07 14:15   ` [PATCH 1/2 v2] " Naoya Horiguchi
2013-10-07 21:21     ` Cyrill Gorcunov
2013-10-08  0:51     ` Andrew Morton
2013-10-08  2:54       ` Naoya Horiguchi [this message]
2013-10-08  8:59       ` Cyrill Gorcunov
2013-10-08  9:03         ` Cyrill Gorcunov

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=1381200894-g4p1jfd3-mutt-n-horiguchi@ah.jp.nec.com \
    --to=n-horiguchi@ah.jp.nec.com \
    --cc=akpm@linux-foundation.org \
    --cc=fengguang.wu@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=xemul@parallels.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