[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1378241540-5f6r7wl-mutt-n-horiguchi@ah.jp.nec.com>
Date: Tue, 03 Sep 2013 16:52:20 -0400
From: Naoya Horiguchi <n-horiguchi@...jp.nec.com>
To: linux-mm@...ck.org
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Mel Gorman <mgorman@...e.de>, Andi Kleen <andi@...stfloor.org>,
Michal Hocko <mhocko@...e.cz>,
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
Rik van Riel <riel@...hat.com>,
Andrea Arcangeli <aarcange@...hat.com>,
kirill.shutemov@...ux.intel.com,
"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>,
Alex Thorlton <athorlton@....com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] thp: support split page table lock
> diff --git v3.11-rc3.orig/mm/huge_memory.c v3.11-rc3/mm/huge_memory.c
> index 243e710..3cb29e1 100644
> --- v3.11-rc3.orig/mm/huge_memory.c
> +++ v3.11-rc3/mm/huge_memory.c
...
> @@ -864,14 +868,17 @@ int copy_huge_pmd(struct mm_struct *dst_mm, struct mm_struct *src_mm,
> pmd_t pmd;
> pgtable_t pgtable;
> int ret;
> + spinlock_t *uninitialized_var(dst_ptl), *uninitialized_var(src_ptl);
>
> ret = -ENOMEM;
> pgtable = pte_alloc_one(dst_mm, addr);
> if (unlikely(!pgtable))
> goto out;
>
> - spin_lock(&dst_mm->page_table_lock);
> - spin_lock_nested(&src_mm->page_table_lock, SINGLE_DEPTH_NESTING);
> + dst_ptl = huge_pmd_lockptr(dst_mm, dst_ptl);
> + src_ptl = huge_pmd_lockptr(src_mm, src_ptl);
I found one mistake. This should be:
+ dst_ptl = huge_pmd_lockptr(dst_mm, dst_pmd);
+ src_ptl = huge_pmd_lockptr(src_mm, src_pmd);
Thanks,
Naoya Horiguchi
> + spin_lock(dst_ptl);
> + spin_lock_nested(src_ptl, SINGLE_DEPTH_NESTING);
>
> ret = -EAGAIN;
> pmd = *src_pmd;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists