linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
To: Andrew Morton <akpm@linux-foundation.org>,
	Hugh Dickins <hughd@google.com>
Cc: David Rientjes <rientjes@google.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Naoya Horiguchi <nao.horiguchi@gmail.com>
Subject: [PATCH 0/5] hugepage migration fixes (v4)
Date: Mon, 15 Sep 2014 18:39:54 -0400	[thread overview]
Message-ID: <1410820799-27278-1-git-send-email-n-horiguchi@ah.jp.nec.com> (raw)

This is the ver.4 of hugepage migration fix patchset.

Major changes from ver.3 are:
- to drop locking from follow_huge_pud() and follow_huge_addr() in patch 2,
  which was buggy and is not necessary now because they don't support FOLL_GET,
- follow_huge_pmd(FOLL_GET) can pin and return tail pages,
- and I fixed bugs accidentally introduced in patch 3 and 5.
Others are code improvements and comment/description fixes.

Two related topics (not included in this series but to be discussed/done)
- follow_huge_pmd() explicitly uses pmd_lockptr() instead of huge_pte_lock().
  This point shed light on the subtlety in huge_page_size == PMD_HUGE check
  in huge_pte_lockptr(). This seems to make no runtime problem now, but might
  look fragile for example when pmd is folded (where PUD_SIZE == PMD_SIZE)
  or when hugepage in your architecture is not bound by page table (where
  hugepage size happens to equal with PMD_SIZE.)
- code around is_hugetlb_entry_migration() and is_hugetlb_entry_hwpoisoned()
  is not beautiful or optimized. Cleanup is necessary.

This patchset is based on mmotm-2014-09-09-14-42 and shows no regression
in libhugetlbfs test.

Tree: git@github.com:Naoya-Horiguchi/linux.git
Branch: mmotm-2014-09-09-14-42/fix_follow_huge_pmd.v4

v2: http://thread.gmane.org/gmane.linux.kernel/1761065
v3: http://thread.gmane.org/gmane.linux.kernel/1776585
---
Summary:

Naoya Horiguchi (5):
      mm/hugetlb: reduce arch dependent code around follow_huge_*
      mm/hugetlb: take page table lock in follow_huge_pmd()
      mm/hugetlb: fix getting refcount 0 page in hugetlb_fault()
      mm/hugetlb: add migration/hwpoisoned entry check in hugetlb_change_protection
      mm/hugetlb: add migration entry check in __unmap_hugepage_range

 arch/arm/mm/hugetlbpage.c     |   6 --
 arch/arm64/mm/hugetlbpage.c   |   6 --
 arch/ia64/mm/hugetlbpage.c    |   6 --
 arch/metag/mm/hugetlbpage.c   |   6 --
 arch/mips/mm/hugetlbpage.c    |  18 ------
 arch/powerpc/mm/hugetlbpage.c |   8 +++
 arch/s390/mm/hugetlbpage.c    |  20 -------
 arch/sh/mm/hugetlbpage.c      |  12 ----
 arch/sparc/mm/hugetlbpage.c   |  12 ----
 arch/tile/mm/hugetlbpage.c    |  28 ----------
 arch/x86/mm/hugetlbpage.c     |  12 ----
 include/linux/hugetlb.h       |   8 +--
 mm/gup.c                      |  25 ++-------
 mm/hugetlb.c                  | 124 ++++++++++++++++++++++++++++--------------
 mm/migrate.c                  |   3 +-
 15 files changed, 101 insertions(+), 193 deletions(-)

--
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>

             reply	other threads:[~2014-09-15 22:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-15 22:39 Naoya Horiguchi [this message]
2014-09-15 22:39 ` [PATCH v3 1/5] mm/hugetlb: reduce arch dependent code around follow_huge_* Naoya Horiguchi
2014-09-16 15:56   ` Naoya Horiguchi
2014-09-15 22:39 ` [PATCH v3 2/5] mm/hugetlb: take page table lock in follow_huge_pmd() Naoya Horiguchi
2014-09-30  4:32   ` Hugh Dickins
2014-10-07 16:56     ` Naoya Horiguchi
2014-09-15 22:39 ` [PATCH v3 3/5] mm/hugetlb: fix getting refcount 0 page in hugetlb_fault() Naoya Horiguchi
2014-09-30  4:52   ` Hugh Dickins
2014-10-07 16:56     ` Naoya Horiguchi
2014-09-15 22:39 ` [PATCH v3 4/5] mm/hugetlb: add migration/hwpoisoned entry check in hugetlb_change_protection Naoya Horiguchi
2014-09-15 22:39 ` [PATCH v3 5/5] mm/hugetlb: add migration entry check in __unmap_hugepage_range Naoya Horiguchi

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=1410820799-27278-1-git-send-email-n-horiguchi@ah.jp.nec.com \
    --to=n-horiguchi@ah.jp.nec.com \
    --cc=akpm@linux-foundation.org \
    --cc=hughd@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=nao.horiguchi@gmail.com \
    --cc=rientjes@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox