All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <20150126120043.GB25833@node.dhcp.inet.fi>

diff --git a/a/1.txt b/N1/1.txt
index e32aeb1..e4365fc 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -207,9 +207,3 @@ index 6a7d36d133fb..c5f44682c0d1 100644
  /* Insert vm structure into process list sorted by address
 -- 
  Kirill A. Shutemov
-
---
-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>
diff --git a/a/content_digest b/N1/content_digest
index 7556453..31cb0ec 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -8,21 +8,10 @@
  "ref\0CANMBJr4YOcHj2G7w-gwfoZjQQd=h0Mj59QNBo3ei_=ejYRcdnw@mail.gmail.com\0"
  "ref\020150124011311.GB9038@node.dhcp.inet.fi\0"
  "ref\020150124043746.GA22262@kahuna\0"
- "From\0Kirill A. Shutemov <kirill@shutemov.name>\0"
- "Subject\0Re: [next-20150119]regression (mm)?\0"
+ "From\0kirill@shutemov.name (Kirill A. Shutemov)\0"
+ "Subject\0[next-20150119]regression (mm)?\0"
  "Date\0Mon, 26 Jan 2015 14:00:43 +0200\0"
- "To\0Nishanth Menon <nm@ti.com>"
- " Andrew Morton <akpm@linux-foundation.org>\0"
- "Cc\0Tyler Baker <tyler.baker@linaro.org>"
-  Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
-  Russell King - ARM Linux <linux@arm.linux.org.uk>
-  Felipe Balbi <balbi@ti.com>
-  linux-mm@kvack.org
-  linux-next <linux-next@vger.kernel.org>
-  linux-omap <linux-omap@vger.kernel.org>
-  linux-arm-kernel@lists.infradead.org <linux-arm-kernel@lists.infradead.org>
-  James Hogan <james.hogan@imgtec.com>
- " Guan Xuetao <gxt@mprc.pku.edu.cn>\0"
+ "To\0linux-arm-kernel@lists.infradead.org\0"
  "\00:1\0"
  "b\0"
  "On Fri, Jan 23, 2015 at 10:37:46PM -0600, Nishanth Menon wrote:\n"
@@ -233,12 +222,6 @@
  " \n"
  " /* Insert vm structure into process list sorted by address\n"
  "-- \n"
- " Kirill A. Shutemov\n"
- "\n"
- "--\n"
- "To unsubscribe, send a message with 'unsubscribe linux-mm' in\n"
- "the body to majordomo@kvack.org.  For more info on Linux MM,\n"
- "see: http://www.linux-mm.org/ .\n"
- "Don't email: <a href=mailto:\"dont@kvack.org\"> email@kvack.org </a>"
+  Kirill A. Shutemov
 
-c4d77d1ff0e696869ec6606355f347ebf2d324ed1d211da58ed93ac205106928
+1b4bd0dd5c79c2b3c8c198126e471013157c4a9cc3eb69a49ef662b5f07a703c

diff --git a/a/1.txt b/N2/1.txt
index e32aeb1..aa2ee6c 100644
--- a/a/1.txt
+++ b/N2/1.txt
@@ -75,141 +75,3 @@ On Fri, Jan 23, 2015 at 10:37:46PM -0600, Nishanth Menon wrote:
 > TOTAL = 16 boards, Booted Boards = 16, No Boot boards = 0
 
 Okay thanks. Here's proper patch.
-
->From 8f9845ab8d972164b700ff3e3ce53484cceb942b Mon Sep 17 00:00:00 2001
-From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
-Date: Mon, 26 Jan 2015 12:07:54 +0200
-Subject: [PATCH 1/2] mm: fix false-positive warning on exit due mm_nr_pmds(mm)
-
-The problem is that we check nr_ptes/nr_pmds in exit_mmap() which happens
-*before* pgd_free(). And if an arch does pte/pmd allocation in pgd_alloc()
-and frees them in pgd_free() we see offset in counters by the time of the
-checks.
-
-We tried to workaround this by offsetting expected counter value
-according to FIRST_USER_ADDRESS for both nr_pte and nr_pmd in
-exit_mmap(). But it doesn't work in some cases:
-
-1. ARM with LPAE enabled also has non-zero USER_PGTABLES_CEILING, but
-   upper addresses occupied with huge pmd entries, so the trick with
-   offsetting expected counter value will get really ugly: we will have
-   to apply it nr_pmds, but not nr_ptes.
-
-2. Metag has non-zero FIRST_USER_ADDRESS, but doesn't do allocation
-   pte/pmd page tables allocation in pgd_alloc(), just setup a pgd entry
-   which is allocated at boot and shared accross all processes.
-
-The proposal is to move the check to check_mm() which happens *after*
-pgd_free() and do proper accounting during pgd_alloc() and pgd_free()
-which would bring counters to zero if nothing leaked.
-
-Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
-Reported-by: Tyler Baker <tyler.baker@linaro.org>
-Tested-by: Nishanth Menon <nm@ti.com>
-Cc: Russell King <linux@arm.linux.org.uk>
-Cc: James Hogan <james.hogan@imgtec.com>
-Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
----
- arch/arm/mm/pgd.c       | 4 ++++
- arch/unicore32/mm/pgd.c | 3 +++
- kernel/fork.c           | 8 ++++++++
- mm/mmap.c               | 5 -----
- 4 files changed, 15 insertions(+), 5 deletions(-)
-
-diff --git a/arch/arm/mm/pgd.c b/arch/arm/mm/pgd.c
-index 249379535be2..a3681f11dd9f 100644
---- a/arch/arm/mm/pgd.c
-+++ b/arch/arm/mm/pgd.c
-@@ -97,6 +97,7 @@ pgd_t *pgd_alloc(struct mm_struct *mm)
- 
- no_pte:
- 	pmd_free(mm, new_pmd);
-+	mm_dec_nr_pmds(mm);
- no_pmd:
- 	pud_free(mm, new_pud);
- no_pud:
-@@ -130,9 +131,11 @@ void pgd_free(struct mm_struct *mm, pgd_t *pgd_base)
- 	pte = pmd_pgtable(*pmd);
- 	pmd_clear(pmd);
- 	pte_free(mm, pte);
-+	atomic_long_dec(&mm->nr_ptes);
- no_pmd:
- 	pud_clear(pud);
- 	pmd_free(mm, pmd);
-+	mm_dec_nr_pmds(mm);
- no_pud:
- 	pgd_clear(pgd);
- 	pud_free(mm, pud);
-@@ -152,6 +155,7 @@ no_pgd:
- 		pmd = pmd_offset(pud, 0);
- 		pud_clear(pud);
- 		pmd_free(mm, pmd);
-+		mm_dec_nr_pmds(mm);
- 		pgd_clear(pgd);
- 		pud_free(mm, pud);
- 	}
-diff --git a/arch/unicore32/mm/pgd.c b/arch/unicore32/mm/pgd.c
-index 08b8d4295e70..1bc00d0305d4 100644
---- a/arch/unicore32/mm/pgd.c
-+++ b/arch/unicore32/mm/pgd.c
-@@ -69,6 +69,7 @@ pgd_t *get_pgd_slow(struct mm_struct *mm)
- 
- no_pte:
- 	pmd_free(mm, new_pmd);
-+	mm_dec_nr_pmds(mm);
- no_pmd:
- 	free_pages((unsigned long)new_pgd, 0);
- no_pgd:
-@@ -96,7 +97,9 @@ void free_pgd_slow(struct mm_struct *mm, pgd_t *pgd)
- 	pte = pmd_pgtable(*pmd);
- 	pmd_clear(pmd);
- 	pte_free(mm, pte);
-+	atomic_long_dec(&mm->nr_ptes);
- 	pmd_free(mm, pmd);
-+	mm_dec_nr_pmds(mm)
- free:
- 	free_pages((unsigned long) pgd, 0);
- }
-diff --git a/kernel/fork.c b/kernel/fork.c
-index c99098c52641..76d6f292274c 100644
---- a/kernel/fork.c
-+++ b/kernel/fork.c
-@@ -606,6 +606,14 @@ static void check_mm(struct mm_struct *mm)
- 			printk(KERN_ALERT "BUG: Bad rss-counter state "
- 					  "mm:%p idx:%d val:%ld\n", mm, i, x);
- 	}
-+
-+	if (atomic_long_read(&mm->nr_ptes))
-+		pr_alert("BUG: non-zero nr_ptes on freeing mm: %ld",
-+				atomic_long_read(&mm->nr_ptes));
-+	if (mm_nr_pmds(mm))
-+		pr_alert("BUG: non-zero nr_pmds on freeing mm: %ld",
-+				mm_nr_pmds(mm));
-+
- #if defined(CONFIG_TRANSPARENT_HUGEPAGE) && !USE_SPLIT_PMD_PTLOCKS
- 	VM_BUG_ON_MM(mm->pmd_huge_pte, mm);
- #endif
-diff --git a/mm/mmap.c b/mm/mmap.c
-index 6a7d36d133fb..c5f44682c0d1 100644
---- a/mm/mmap.c
-+++ b/mm/mmap.c
-@@ -2851,11 +2851,6 @@ void exit_mmap(struct mm_struct *mm)
- 		vma = remove_vma(vma);
- 	}
- 	vm_unacct_memory(nr_accounted);
--
--	WARN_ON(atomic_long_read(&mm->nr_ptes) >
--			round_up(FIRST_USER_ADDRESS, PMD_SIZE) >> PMD_SHIFT);
--	WARN_ON(mm_nr_pmds(mm) >
--			round_up(FIRST_USER_ADDRESS, PUD_SIZE) >> PUD_SHIFT);
- }
- 
- /* Insert vm structure into process list sorted by address
--- 
- Kirill A. Shutemov
-
---
-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>
diff --git a/a/content_digest b/N2/content_digest
index 7556453..40bc42f 100644
--- a/a/content_digest
+++ b/N2/content_digest
@@ -101,144 +101,6 @@
  "> 16:                        sdp4430: BOOT: PASS: http://paste.ubuntu.org.cn/2221713\n"
  "> TOTAL = 16 boards, Booted Boards = 16, No Boot boards = 0\n"
  "\n"
- "Okay thanks. Here's proper patch.\n"
- "\n"
- ">From 8f9845ab8d972164b700ff3e3ce53484cceb942b Mon Sep 17 00:00:00 2001\n"
- "From: \"Kirill A. Shutemov\" <kirill.shutemov@linux.intel.com>\n"
- "Date: Mon, 26 Jan 2015 12:07:54 +0200\n"
- "Subject: [PATCH 1/2] mm: fix false-positive warning on exit due mm_nr_pmds(mm)\n"
- "\n"
- "The problem is that we check nr_ptes/nr_pmds in exit_mmap() which happens\n"
- "*before* pgd_free(). And if an arch does pte/pmd allocation in pgd_alloc()\n"
- "and frees them in pgd_free() we see offset in counters by the time of the\n"
- "checks.\n"
- "\n"
- "We tried to workaround this by offsetting expected counter value\n"
- "according to FIRST_USER_ADDRESS for both nr_pte and nr_pmd in\n"
- "exit_mmap(). But it doesn't work in some cases:\n"
- "\n"
- "1. ARM with LPAE enabled also has non-zero USER_PGTABLES_CEILING, but\n"
- "   upper addresses occupied with huge pmd entries, so the trick with\n"
- "   offsetting expected counter value will get really ugly: we will have\n"
- "   to apply it nr_pmds, but not nr_ptes.\n"
- "\n"
- "2. Metag has non-zero FIRST_USER_ADDRESS, but doesn't do allocation\n"
- "   pte/pmd page tables allocation in pgd_alloc(), just setup a pgd entry\n"
- "   which is allocated at boot and shared accross all processes.\n"
- "\n"
- "The proposal is to move the check to check_mm() which happens *after*\n"
- "pgd_free() and do proper accounting during pgd_alloc() and pgd_free()\n"
- "which would bring counters to zero if nothing leaked.\n"
- "\n"
- "Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>\n"
- "Reported-by: Tyler Baker <tyler.baker@linaro.org>\n"
- "Tested-by: Nishanth Menon <nm@ti.com>\n"
- "Cc: Russell King <linux@arm.linux.org.uk>\n"
- "Cc: James Hogan <james.hogan@imgtec.com>\n"
- "Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>\n"
- "---\n"
- " arch/arm/mm/pgd.c       | 4 ++++\n"
- " arch/unicore32/mm/pgd.c | 3 +++\n"
- " kernel/fork.c           | 8 ++++++++\n"
- " mm/mmap.c               | 5 -----\n"
- " 4 files changed, 15 insertions(+), 5 deletions(-)\n"
- "\n"
- "diff --git a/arch/arm/mm/pgd.c b/arch/arm/mm/pgd.c\n"
- "index 249379535be2..a3681f11dd9f 100644\n"
- "--- a/arch/arm/mm/pgd.c\n"
- "+++ b/arch/arm/mm/pgd.c\n"
- "@@ -97,6 +97,7 @@ pgd_t *pgd_alloc(struct mm_struct *mm)\n"
- " \n"
- " no_pte:\n"
- " \tpmd_free(mm, new_pmd);\n"
- "+\tmm_dec_nr_pmds(mm);\n"
- " no_pmd:\n"
- " \tpud_free(mm, new_pud);\n"
- " no_pud:\n"
- "@@ -130,9 +131,11 @@ void pgd_free(struct mm_struct *mm, pgd_t *pgd_base)\n"
- " \tpte = pmd_pgtable(*pmd);\n"
- " \tpmd_clear(pmd);\n"
- " \tpte_free(mm, pte);\n"
- "+\tatomic_long_dec(&mm->nr_ptes);\n"
- " no_pmd:\n"
- " \tpud_clear(pud);\n"
- " \tpmd_free(mm, pmd);\n"
- "+\tmm_dec_nr_pmds(mm);\n"
- " no_pud:\n"
- " \tpgd_clear(pgd);\n"
- " \tpud_free(mm, pud);\n"
- "@@ -152,6 +155,7 @@ no_pgd:\n"
- " \t\tpmd = pmd_offset(pud, 0);\n"
- " \t\tpud_clear(pud);\n"
- " \t\tpmd_free(mm, pmd);\n"
- "+\t\tmm_dec_nr_pmds(mm);\n"
- " \t\tpgd_clear(pgd);\n"
- " \t\tpud_free(mm, pud);\n"
- " \t}\n"
- "diff --git a/arch/unicore32/mm/pgd.c b/arch/unicore32/mm/pgd.c\n"
- "index 08b8d4295e70..1bc00d0305d4 100644\n"
- "--- a/arch/unicore32/mm/pgd.c\n"
- "+++ b/arch/unicore32/mm/pgd.c\n"
- "@@ -69,6 +69,7 @@ pgd_t *get_pgd_slow(struct mm_struct *mm)\n"
- " \n"
- " no_pte:\n"
- " \tpmd_free(mm, new_pmd);\n"
- "+\tmm_dec_nr_pmds(mm);\n"
- " no_pmd:\n"
- " \tfree_pages((unsigned long)new_pgd, 0);\n"
- " no_pgd:\n"
- "@@ -96,7 +97,9 @@ void free_pgd_slow(struct mm_struct *mm, pgd_t *pgd)\n"
- " \tpte = pmd_pgtable(*pmd);\n"
- " \tpmd_clear(pmd);\n"
- " \tpte_free(mm, pte);\n"
- "+\tatomic_long_dec(&mm->nr_ptes);\n"
- " \tpmd_free(mm, pmd);\n"
- "+\tmm_dec_nr_pmds(mm)\n"
- " free:\n"
- " \tfree_pages((unsigned long) pgd, 0);\n"
- " }\n"
- "diff --git a/kernel/fork.c b/kernel/fork.c\n"
- "index c99098c52641..76d6f292274c 100644\n"
- "--- a/kernel/fork.c\n"
- "+++ b/kernel/fork.c\n"
- "@@ -606,6 +606,14 @@ static void check_mm(struct mm_struct *mm)\n"
- " \t\t\tprintk(KERN_ALERT \"BUG: Bad rss-counter state \"\n"
- " \t\t\t\t\t  \"mm:%p idx:%d val:%ld\\n\", mm, i, x);\n"
- " \t}\n"
- "+\n"
- "+\tif (atomic_long_read(&mm->nr_ptes))\n"
- "+\t\tpr_alert(\"BUG: non-zero nr_ptes on freeing mm: %ld\",\n"
- "+\t\t\t\tatomic_long_read(&mm->nr_ptes));\n"
- "+\tif (mm_nr_pmds(mm))\n"
- "+\t\tpr_alert(\"BUG: non-zero nr_pmds on freeing mm: %ld\",\n"
- "+\t\t\t\tmm_nr_pmds(mm));\n"
- "+\n"
- " #if defined(CONFIG_TRANSPARENT_HUGEPAGE) && !USE_SPLIT_PMD_PTLOCKS\n"
- " \tVM_BUG_ON_MM(mm->pmd_huge_pte, mm);\n"
- " #endif\n"
- "diff --git a/mm/mmap.c b/mm/mmap.c\n"
- "index 6a7d36d133fb..c5f44682c0d1 100644\n"
- "--- a/mm/mmap.c\n"
- "+++ b/mm/mmap.c\n"
- "@@ -2851,11 +2851,6 @@ void exit_mmap(struct mm_struct *mm)\n"
- " \t\tvma = remove_vma(vma);\n"
- " \t}\n"
- " \tvm_unacct_memory(nr_accounted);\n"
- "-\n"
- "-\tWARN_ON(atomic_long_read(&mm->nr_ptes) >\n"
- "-\t\t\tround_up(FIRST_USER_ADDRESS, PMD_SIZE) >> PMD_SHIFT);\n"
- "-\tWARN_ON(mm_nr_pmds(mm) >\n"
- "-\t\t\tround_up(FIRST_USER_ADDRESS, PUD_SIZE) >> PUD_SHIFT);\n"
- " }\n"
- " \n"
- " /* Insert vm structure into process list sorted by address\n"
- "-- \n"
- " Kirill A. Shutemov\n"
- "\n"
- "--\n"
- "To unsubscribe, send a message with 'unsubscribe linux-mm' in\n"
- "the body to majordomo@kvack.org.  For more info on Linux MM,\n"
- "see: http://www.linux-mm.org/ .\n"
- "Don't email: <a href=mailto:\"dont@kvack.org\"> email@kvack.org </a>"
+ Okay thanks. Here's proper patch.
 
-c4d77d1ff0e696869ec6606355f347ebf2d324ed1d211da58ed93ac205106928
+e5c20279477381c5e6df8061373404e6ec031fc94ed1d9451f4c90fa43a5170e

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.