[to-be-updated] mm-proc-smaps_rollup-fix-pss_locked-calculation.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: fs/proc/task_mmu.c: fix smaps_rollup pss_locked calculation
has been removed from the -mm tree.  Its filename was
     mm-proc-smaps_rollup-fix-pss_locked-calculation.patch

This patch was dropped because an updated version will be merged

------------------------------------------------------
From: Sandeep Patil <sspatil@xxxxxxxxxxx>
Subject: fs/proc/task_mmu.c: fix smaps_rollup pss_locked calculation

The 'pss_locked' field of smaps_rollup was being calculated incorrectly as
it accumulated the current pss everytime a locked VMA was found.

Fix that by making sure we record the current pss value before each VMA is
walked.  So, we can only add the delta if the VMA was found to be
VM_LOCKED.

Link: http://lkml.kernel.org/r/20190121011049.160505-1-sspatil@xxxxxxxxxxx
Fixes: 493b0e9d945f ("mm: add /proc/pid/smaps_rollup")
Signed-off-by: Sandeep Patil <sspatil@xxxxxxxxxxx>
Cc: Vlastimil Babka <vbabka@xxxxxxx>
Cc: Alexey Dobriyan <adobriyan@xxxxxxxxx>
Cc: Andrey Vagin <avagin@xxxxxxxxxx>
Cc: Daniel Colascione <dancol@xxxxxxxxxx>
Cc: <stable@xxxxxxxxxxxxxxx>	[4.14.x 4.19.x]
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/proc/task_mmu.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

--- a/fs/proc/task_mmu.c~mm-proc-smaps_rollup-fix-pss_locked-calculation
+++ a/fs/proc/task_mmu.c
@@ -709,6 +709,7 @@ static void smap_gather_stats(struct vm_
 #endif
 		.mm = vma->vm_mm,
 	};
+	unsigned long pss;
 
 	smaps_walk.private = mss;
 
@@ -737,11 +738,12 @@ static void smap_gather_stats(struct vm_
 		}
 	}
 #endif
-
+	/* record current pss so we can calculate the delta after page walk */
+	pss = mss->pss;
 	/* mmap_sem is held in m_start */
 	walk_page_vma(vma, &smaps_walk);
 	if (vma->vm_flags & VM_LOCKED)
-		mss->pss_locked += mss->pss;
+		mss->pss_locked += mss->pss - pss;
 }
 
 #define SEQ_PUT_DEC(str, val) \
_

Patches currently in -mm which might be from sspatil@xxxxxxxxxxx are





[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux