- mmaps2-vma-out-of-mem_size_stats.patch removed from -mm tree

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

 



The patch titled
     maps2: vma out of mem_size_stats
has been removed from the -mm tree.  Its filename was
     mmaps2-vma-out-of-mem_size_stats.patch

This patch was dropped because an updated version will be merged

------------------------------------------------------
Subject: maps2: vma out of mem_size_stats
From: Rusty Russell <rusty@xxxxxxxxxxxxxxx>

Putting the vma inside "struct mem_size_stats" to hand it through the
pagewalker is a little gross.  Making a separate struct is more verbose, but
clearer.

Signed-off-by: Rusty Russell <rusty@xxxxxxxxxxxxxxx>
Cc: Matt Mackall <mpm@xxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/proc/task_mmu.c |   32 +++++++++++++++++++-------------
 1 files changed, 19 insertions(+), 13 deletions(-)

diff -puN fs/proc/task_mmu.c~mmaps2-vma-out-of-mem_size_stats fs/proc/task_mmu.c
--- a/fs/proc/task_mmu.c~mmaps2-vma-out-of-mem_size_stats
+++ a/fs/proc/task_mmu.c
@@ -318,7 +318,6 @@ const struct file_operations proc_maps_o
 #ifdef CONFIG_PROC_SMAPS
 struct mem_size_stats
 {
-	struct vm_area_struct *vma;
 	unsigned long resident;
 	unsigned long shared_clean;
 	unsigned long shared_dirty;
@@ -327,11 +326,18 @@ struct mem_size_stats
 	unsigned long referenced;
 };
 
+struct smaps_arg
+{
+	struct mem_size_stats mss;
+	struct vm_area_struct *vma;
+};
+
 static int smaps_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end,
 			   void *private)
 {
-	struct mem_size_stats *mss = private;
-	struct vm_area_struct *vma = mss->vma;
+	struct smaps_arg *sarg = private;
+	struct vm_area_struct *vma = sarg->vma;
+	struct mem_size_stats *mss = &sarg->mss;
 	pte_t *pte, ptent;
 	spinlock_t *ptl;
 	struct page *page;
@@ -373,14 +379,14 @@ static struct mm_walk smaps_walk = { .pm
 static int show_smap(struct seq_file *m, void *v)
 {
 	struct vm_area_struct *vma = v;
-	struct mem_size_stats mss;
+	struct smaps_arg sarg;
 	int ret;
 
-	memset(&mss, 0, sizeof mss);
-	mss.vma = vma;
+	memset(&sarg.mss, 0, sizeof sarg.mss);
+	sarg.vma = vma;
 	if (vma->vm_mm && !is_vm_hugetlb_page(vma))
 		walk_page_range(vma->vm_mm, vma->vm_start, vma->vm_end,
-				&smaps_walk, &mss);
+				&smaps_walk, &sarg);
 
 	ret = show_map(m, v);
 	if (ret)
@@ -395,12 +401,12 @@ static int show_smap(struct seq_file *m,
 		   "Private_Dirty:  %8lu kB\n"
 		   "Referenced:     %8lu kB\n",
 		   (vma->vm_end - vma->vm_start) >> 10,
-		   mss.resident >> 10,
-		   mss.shared_clean  >> 10,
-		   mss.shared_dirty  >> 10,
-		   mss.private_clean >> 10,
-		   mss.private_dirty >> 10,
-		   mss.referenced >> 10);
+		   sarg.mss.resident >> 10,
+		   sarg.mss.shared_clean  >> 10,
+		   sarg.mss.shared_dirty  >> 10,
+		   sarg.mss.private_clean >> 10,
+		   sarg.mss.private_dirty >> 10,
+		   sarg.mss.referenced >> 10);
 
 	return ret;
 }
_

Patches currently in -mm which might be from rusty@xxxxxxxxxxxxxxx are

origin.patch
mmaps2-vma-out-of-mem_size_stats.patch
maps2-make-proc-pid-smaps-optional-under-config_embeddedpatch.patch
maps2-make-proc-pid-smaps-optional-under-config_embeddedpatch-fix.patch
remove-unsafe-from-module-struct.patch
delay-creation-of-khcvd-thread.patch
hvc-console-is-also-used-by-iseries-so-add-that-to-hvc_driver-help.patch
module-return-error-when-mod_sysfs_init-failed.patch
cpu-hotplug-cpu-deliver-cpu_up_canceled-only-to-notify_oked-callbacks-with-cpu_up_prepare.patch
linux-kernel-markers.patch
linux-kernel-markers-checkpatch-fixes.patch
linux-kernel-markers-coding-style-fixes.patch
linux-kernel-markers-samples-coding-style-fix.patch
mm-clean-up-and-kernelify-shrinker-registration-reiser4.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

  Powered by Linux