diff for duplicates of <20150209164248.GA29522@node.dhcp.inet.fi> diff --git a/a/1.txt b/N1/1.txt index b50345d..3de3d2c 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -29,56 +29,3 @@ On Sat, Feb 07, 2015 at 08:33:02AM +0100, Sedat Dilek wrote: Sorry, my fault. The patch below should fix that. - ->From 11bce596e653302e41f819435912f01ca8cbc27e Mon Sep 17 00:00:00 2001 -From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> -Date: Mon, 9 Feb 2015 18:34:56 +0200 -Subject: [PATCH] mm: fix race on pmd accounting - -Do not account the pmd table to the process if other thread allocated it -under us. - -Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> -Reported-by: Sedat Dilek <sedat.dilek@gmail.com> ---- - mm/memory.c | 15 ++++++++------- - 1 file changed, 8 insertions(+), 7 deletions(-) - -diff --git a/mm/memory.c b/mm/memory.c -index 8ae52c918415..802adda2b0b6 100644 ---- a/mm/memory.c -+++ b/mm/memory.c -@@ -3350,17 +3350,18 @@ int __pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address) - smp_wmb(); /* See comment in __pte_alloc */ - - spin_lock(&mm->page_table_lock); -- mm_inc_nr_pmds(mm); - #ifndef __ARCH_HAS_4LEVEL_HACK -- if (pud_present(*pud)) /* Another has populated it */ -- pmd_free(mm, new); -- else -+ if (!pud_present(*pud)) { -+ mm_inc_nr_pmds(mm); - pud_populate(mm, pud, new); --#else -- if (pgd_present(*pud)) /* Another has populated it */ -+ } else /* Another has populated it */ - pmd_free(mm, new); -- else -+#else -+ if (!pgd_present(*pud)) { -+ mm_inc_nr_pmds(mm); - pgd_populate(mm, pud, new); -+ } else /* Another has populated it */ -+ pmd_free(mm, new); - #endif /* __ARCH_HAS_4LEVEL_HACK */ - spin_unlock(&mm->page_table_lock); - return 0; --- - 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 fa88d8b..3a3a40f 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -42,59 +42,6 @@ "\n" "Sorry, my fault.\n" "\n" - "The patch below should fix that.\n" - "\n" - ">From 11bce596e653302e41f819435912f01ca8cbc27e Mon Sep 17 00:00:00 2001\n" - "From: \"Kirill A. Shutemov\" <kirill.shutemov@linux.intel.com>\n" - "Date: Mon, 9 Feb 2015 18:34:56 +0200\n" - "Subject: [PATCH] mm: fix race on pmd accounting\n" - "\n" - "Do not account the pmd table to the process if other thread allocated it\n" - "under us.\n" - "\n" - "Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>\n" - "Reported-by: Sedat Dilek <sedat.dilek@gmail.com>\n" - "---\n" - " mm/memory.c | 15 ++++++++-------\n" - " 1 file changed, 8 insertions(+), 7 deletions(-)\n" - "\n" - "diff --git a/mm/memory.c b/mm/memory.c\n" - "index 8ae52c918415..802adda2b0b6 100644\n" - "--- a/mm/memory.c\n" - "+++ b/mm/memory.c\n" - "@@ -3350,17 +3350,18 @@ int __pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address)\n" - " \tsmp_wmb(); /* See comment in __pte_alloc */\n" - " \n" - " \tspin_lock(&mm->page_table_lock);\n" - "-\tmm_inc_nr_pmds(mm);\n" - " #ifndef __ARCH_HAS_4LEVEL_HACK\n" - "-\tif (pud_present(*pud))\t\t/* Another has populated it */\n" - "-\t\tpmd_free(mm, new);\n" - "-\telse\n" - "+\tif (!pud_present(*pud)) {\n" - "+\t\tmm_inc_nr_pmds(mm);\n" - " \t\tpud_populate(mm, pud, new);\n" - "-#else\n" - "-\tif (pgd_present(*pud))\t\t/* Another has populated it */\n" - "+\t} else\t/* Another has populated it */\n" - " \t\tpmd_free(mm, new);\n" - "-\telse\n" - "+#else\n" - "+\tif (!pgd_present(*pud)) {\n" - "+\t\tmm_inc_nr_pmds(mm);\n" - " \t\tpgd_populate(mm, pud, new);\n" - "+\t} else /* Another has populated it */\n" - "+\t\tpmd_free(mm, new);\n" - " #endif /* __ARCH_HAS_4LEVEL_HACK */\n" - " \tspin_unlock(&mm->page_table_lock);\n" - " \treturn 0;\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>" + The patch below should fix that. -23e59ff62d560b09dbdeb2af914b015d6d2f8c22c385bf7a33c43ed896ee1cda +8392c49aae8b7d68a64ae343006602ad61491e4982b8357977964487028fd22e
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.