Skip to content

Commit ec8e41a

Browse files
Naoya Horiguchitorvalds
authored andcommitted
/proc/pid/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> Cc: Wu Fengguang <fengguang.wu@intel.com> Cc: Pavel Emelyanov <xemul@parallels.com> Acked-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent bfc4f9d commit ec8e41a

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

‎Documentation/filesystems/proc.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,7 @@ manner. The codes are the following:
460460
nl - non-linear mapping
461461
ar - architecture specific flag
462462
dd - do not include area into core dump
463+
sd - soft-dirty flag
463464
mm - mixed map area
464465
hg - huge page advise flag
465466
nh - no-huge page advise flag

‎fs/proc/task_mmu.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -561,6 +561,9 @@ static void show_smap_vma_flags(struct seq_file *m, struct vm_area_struct *vma)
561561
[ilog2(VM_NONLINEAR)] = "nl",
562562
[ilog2(VM_ARCH_1)] = "ar",
563563
[ilog2(VM_DONTDUMP)] = "dd",
564+
#ifdef CONFIG_MEM_SOFT_DIRTY
565+
[ilog2(VM_SOFTDIRTY)] = "sd",
566+
#endif
564567
[ilog2(VM_MIXEDMAP)] = "mm",
565568
[ilog2(VM_HUGEPAGE)] = "hg",
566569
[ilog2(VM_NOHUGEPAGE)] = "nh",

0 commit comments

Comments
 (0)