[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <501A9164.5040304@redhat.com>
Date: Thu, 02 Aug 2012 10:40:36 -0400
From: Rik van Riel <riel@...hat.com>
To: Michal Hocko <mhocko@...e.cz>
CC: Andrew Morton <akpm@...ux-foundation.org>,
Mel Gorman <mgorman@...e.de>, Hugh Dickins <hughd@...gle.com>,
Linux-MM <linux-mm@...ck.org>,
David Gibson <david@...son.dropbear.id.au>,
Ken Chen <kenchen@...gle.com>,
Cong Wang <xiyou.wangcong@...il.com>,
LKML <linux-kernel@...r.kernel.org>,
Larry Woodman <lwoodman@...hat.com>
Subject: Re: [PATCH -mm] mm: hugetlbfs: Correctly populate shared pmd
On 08/02/2012 10:16 AM, Michal Hocko wrote:
> Hi Andrew,
> the following patch fixes yet-another race in the hugetlb pte sharing
> code reported by Larry. It is based on top of the current -mm tree but
> it cleanly applies to linus tree as well. It should go to stable as
> well. The bug is there for ages but this fix is possible only since 3.0
> because i_mmap_lock used to be a spinlock until 3d48ae45 which turned it
> into mutex and so we can call pmd_alloc.
> This patch addresses the issue by moving pmd_alloc into huge_pmd_share
> which guarantees that the shared pud is populated in the same
> critical section as pmd. This also means that huge_pte_offset test in
> huge_pmd_share is serialized correctly now which in turn means that
> the success of the sharing will be higher as the racing tasks see the
> pud and pmd populated together.
>
> Race identified and changelog written mostly by Mel Gorman
> Reported-and-tested-by: Larry Woodman <lwoodman@...hat.com>
> Reviewed-by: Mel Gorman <mgorman@...e.de>
> Signed-off-by: Michal Hocko <mhocko@...e.cz>
Reviewed-by: Rik van Riel <riel@...hat.com>
--
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