From: Rik van Riel <riel@redhat.com>
To: Michal Hocko <mhocko@suse.cz>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Mel Gorman <mgorman@suse.de>, Hugh Dickins <hughd@google.com>,
Linux-MM <linux-mm@kvack.org>,
David Gibson <david@gibson.dropbear.id.au>,
Ken Chen <kenchen@google.com>,
Cong Wang <xiyou.wangcong@gmail.com>,
LKML <linux-kernel@vger.kernel.org>,
Larry Woodman <lwoodman@redhat.com>
Subject: Re: [PATCH -mm] mm: hugetlbfs: Correctly populate shared pmd
Date: Thu, 02 Aug 2012 10:40:36 -0400 [thread overview]
Message-ID: <501A9164.5040304@redhat.com> (raw)
In-Reply-To: <20120802141656.GB18084@dhcp22.suse.cz>
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@redhat.com>
> Reviewed-by: Mel Gorman <mgorman@suse.de>
> Signed-off-by: Michal Hocko <mhocko@suse.cz>
Reviewed-by: Rik van Riel <riel@redhat.com>
--
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>
WARNING: multiple messages have this Message-ID (diff)
From: Rik van Riel <riel@redhat.com>
To: Michal Hocko <mhocko@suse.cz>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Mel Gorman <mgorman@suse.de>, Hugh Dickins <hughd@google.com>,
Linux-MM <linux-mm@kvack.org>,
David Gibson <david@gibson.dropbear.id.au>,
Ken Chen <kenchen@google.com>,
Cong Wang <xiyou.wangcong@gmail.com>,
LKML <linux-kernel@vger.kernel.org>,
Larry Woodman <lwoodman@redhat.com>
Subject: Re: [PATCH -mm] mm: hugetlbfs: Correctly populate shared pmd
Date: Thu, 02 Aug 2012 10:40:36 -0400 [thread overview]
Message-ID: <501A9164.5040304@redhat.com> (raw)
In-Reply-To: <20120802141656.GB18084@dhcp22.suse.cz>
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@redhat.com>
> Reviewed-by: Mel Gorman <mgorman@suse.de>
> Signed-off-by: Michal Hocko <mhocko@suse.cz>
Reviewed-by: Rik van Riel <riel@redhat.com>
next prev parent reply other threads:[~2012-08-02 14:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-02 14:16 [PATCH -mm] mm: hugetlbfs: Correctly populate shared pmd Michal Hocko
2012-08-02 14:16 ` Michal Hocko
2012-08-02 14:40 ` Rik van Riel [this message]
2012-08-02 14:40 ` Rik van Riel
2012-08-03 14:16 ` Hillf Danton
2012-08-03 14:37 ` Michal Hocko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=501A9164.5040304@redhat.com \
--to=riel@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=david@gibson.dropbear.id.au \
--cc=hughd@google.com \
--cc=kenchen@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lwoodman@redhat.com \
--cc=mgorman@suse.de \
--cc=mhocko@suse.cz \
--cc=xiyou.wangcong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.