* + mm-hwpoison-remove-incorrect-comment.patch added to -mm tree
@ 2016-07-20 21:51 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2016-07-20 21:51 UTC (permalink / raw)
To: n-horiguchi, mhocko, zhanc1, mm-commits
The patch titled
Subject: mm: hwpoison: remove incorrect comments
has been added to the -mm tree. Its filename is
mm-hwpoison-remove-incorrect-comment.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/mm-hwpoison-remove-incorrect-comment.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/mm-hwpoison-remove-incorrect-comment.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Subject: mm: hwpoison: remove incorrect comments
dequeue_hwpoisoned_huge_page() can be called without page lock hold,
so let's remove incorrect comment.
The reason why the page lock is not really needed is that
dequeue_hwpoisoned_huge_page() checks page_huge_active() inside hugetlb_lock,
which allows us to avoid trying to dequeue a hugepage that are just allocated
but not linked to active list yet, even without taking page lock.
Link: http://lkml.kernel.org/r/20160720092901.GA15995@www9186uo.sakura.ne.jp
Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Reported-by: Zhan Chen <zhanc1@andrew.cmu.edu>
Acked-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/hugetlb.c | 1 -
mm/memory-failure.c | 2 --
2 files changed, 3 deletions(-)
diff -puN mm/hugetlb.c~mm-hwpoison-remove-incorrect-comment mm/hugetlb.c
--- a/mm/hugetlb.c~mm-hwpoison-remove-incorrect-comment
+++ a/mm/hugetlb.c
@@ -4396,7 +4396,6 @@ follow_huge_pud(struct mm_struct *mm, un
/*
* This function is called from memory failure code.
- * Assume the caller holds page lock of the head page.
*/
int dequeue_hwpoisoned_huge_page(struct page *hpage)
{
diff -puN mm/memory-failure.c~mm-hwpoison-remove-incorrect-comment mm/memory-failure.c
--- a/mm/memory-failure.c~mm-hwpoison-remove-incorrect-comment
+++ a/mm/memory-failure.c
@@ -741,8 +741,6 @@ static int me_huge_page(struct page *p,
* page->lru because it can be used in other hugepage operations,
* such as __unmap_hugepage_range() and gather_surplus_pages().
* So instead we use page_mapping() and PageAnon().
- * We assume that this function is called with page lock held,
- * so there is no race between isolation and mapping/unmapping.
*/
if (!(page_mapping(hpage) || PageAnon(hpage))) {
res = dequeue_hwpoisoned_huge_page(hpage);
_
Patches currently in -mm which might be from n-horiguchi@ah.jp.nec.com are
mm-thp-check-pmd_trans_unstable-after-split_huge_pmd.patch
mm-hwpoison-remove-incorrect-comment.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-07-20 21:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-20 21:51 + mm-hwpoison-remove-incorrect-comment.patch added to -mm tree akpm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).