Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1423368 > unrolled thread
| Started by | "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> |
|---|---|
| First post | 2016-06-15 22:10 +0200 |
| Last post | 2016-06-16 10:10 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCHv9-rebased2 03/37] mm, thp: fix locking inconsistency in collapse_huge_page "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2016-06-15 22:10 +0200
Re: [PATCHv9-rebased2 03/37] mm, thp: fix locking inconsistency in collapse_huge_page Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-06-16 02:50 +0200
Re: [PATCHv9-rebased2 03/37] mm, thp: fix locking inconsistency in collapse_huge_page "Kirill A. Shutemov" <kirill@shutemov.name> - 2016-06-16 10:10 +0200
| From | "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> |
|---|---|
| Date | 2016-06-15 22:10 +0200 |
| Subject | [PATCHv9-rebased2 03/37] mm, thp: fix locking inconsistency in collapse_huge_page |
| Message-ID | <rKpiq-74l-47@gated-at.bofh.it> |
From: Ebru Akagunduz <ebru.akagunduz@gmail.com>
After creating revalidate vma function, locking inconsistency occured
due to directing the code path to wrong label. This patch directs
to correct label and fix the inconsistency.
Related commit that caused inconsistency:
http://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/commit/?id=da4360877094368f6dfe75bbe804b0f0a5d575b0
Link: http://lkml.kernel.org/r/1464956884-4644-1-git-send-email-ebru.akagunduz@gmail.com
Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Rik van Riel <riel@redhat.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/huge_memory.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 7bb30e853335..1777b806de96 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -2487,13 +2487,18 @@ static void collapse_huge_page(struct mm_struct *mm,
down_read(&mm->mmap_sem);
result = hugepage_vma_revalidate(mm, address);
- if (result)
- goto out;
+ if (result) {
+ mem_cgroup_cancel_charge(new_page, memcg, true);
+ up_read(&mm->mmap_sem);
+ goto out_nolock;
+ }
pmd = mm_find_pmd(mm, address);
if (!pmd) {
result = SCAN_PMD_NULL;
- goto out;
+ mem_cgroup_cancel_charge(new_page, memcg, true);
+ up_read(&mm->mmap_sem);
+ goto out_nolock;
}
/*
@@ -2502,8 +2507,9 @@ static void collapse_huge_page(struct mm_struct *mm,
* label out. Continuing to collapse causes inconsistency.
*/
if (!__collapse_huge_page_swapin(mm, vma, address, pmd)) {
+ mem_cgroup_cancel_charge(new_page, memcg, true);
up_read(&mm->mmap_sem);
- goto out;
+ goto out_nolock;
}
up_read(&mm->mmap_sem);
--
2.8.1
[toc] | [next] | [standalone]
| From | Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> |
|---|---|
| Date | 2016-06-16 02:50 +0200 |
| Subject | Re: [PATCHv9-rebased2 03/37] mm, thp: fix locking inconsistency in collapse_huge_page |
| Message-ID | <rKtFn-1j0-3@gated-at.bofh.it> |
| In reply to | #1423368 |
Hello, On (06/15/16 23:06), Kirill A. Shutemov wrote: [..] > After creating revalidate vma function, locking inconsistency occured > due to directing the code path to wrong label. This patch directs > to correct label and fix the inconsistency. > > Related commit that caused inconsistency: > http://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/commit/?id=da4360877094368f6dfe75bbe804b0f0a5d575b0 as far as I remember, Vlastimil had "one more thing" to ask http://marc.info/?l=linux-mm&m=146521832732210&w=2 or is it safe? -ss
[toc] | [prev] | [next] | [standalone]
| From | "Kirill A. Shutemov" <kirill@shutemov.name> |
|---|---|
| Date | 2016-06-16 10:10 +0200 |
| Subject | Re: [PATCHv9-rebased2 03/37] mm, thp: fix locking inconsistency in collapse_huge_page |
| Message-ID | <rKAxc-5MU-7@gated-at.bofh.it> |
| In reply to | #1423612 |
On Thu, Jun 16, 2016 at 09:43:07AM +0900, Sergey Senozhatsky wrote: > Hello, > > On (06/15/16 23:06), Kirill A. Shutemov wrote: > [..] > > After creating revalidate vma function, locking inconsistency occured > > due to directing the code path to wrong label. This patch directs > > to correct label and fix the inconsistency. > > > > Related commit that caused inconsistency: > > http://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/commit/?id=da4360877094368f6dfe75bbe804b0f0a5d575b0 > > > as far as I remember, Vlastimil had "one more thing" to ask > http://marc.info/?l=linux-mm&m=146521832732210&w=2 > > or is it safe? As I mentioned in cover letter, 05/37 address the issue. I didn't fold it in. It's up to Andrew. -- Kirill A. Shutemov
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web