linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] Add hstate parameter to huge_pte_offset()
@ 2017-03-23 12:58 Punit Agrawal
  2017-03-23 12:58 ` [RFC PATCH 1/2] mm/hugetlb.c: add " Punit Agrawal
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Punit Agrawal @ 2017-03-23 12:58 UTC (permalink / raw)
  To: linux-mm
  Cc: linux-arm-kernel, linux-kernel, Punit Agrawal, Catalin Marinas,
	Andrew Morton, Kirill A. Shutemov, Tyler Baicar

On architectures that support hugepages composed of contiguous pte as
well as block entries at the same level in the page table,
huge_pte_offset() is not able to determine the right offset to return
when it encounters a swap entry (which is used to mark poisoned as
well as migrated pages in the page table).

huge_pte_offset() needs to know the size of the hugepage at the
requested address to determine the offset to return - the current
entry or the first entry of a set of contiguous hugepages. This came
up while enabling support for memory failure handling on arm64[0].

Patch 1 adds a hstate parameter to huge_pte_offset() to provide
additional information about the target address. It also updates the
signatures (and usage) of huge_pte_offset() for architectures that
override the generic implementation. This patch has been compile
tested on ia64 and x86.

Patch 2 uses the size determined by the parameter added in Patch 1, to
return the correct page table offset.

The patchset is based on top of v4.11-rc3 and the arm64 huge page
cleanup for break-before-make[1].

Thanks,
Punit


[0] http://marc.info/?l=linux-arm-kernel&m=148772028907925&w=2
[1] https://www.spinics.net/lists/arm-kernel/msg570422.html

Punit Agrawal (2):
  mm/hugetlb.c: add hstate parameter to huge_pte_offset()
  arm64: hugetlbpages: Correctly handle swap entries in
    huge_pte_offset()

 arch/arm64/mm/hugetlbpage.c   | 33 +++++++++++++++++----------------
 arch/ia64/mm/hugetlbpage.c    |  4 ++--
 arch/metag/mm/hugetlbpage.c   |  2 +-
 arch/mips/mm/hugetlbpage.c    |  2 +-
 arch/parisc/mm/hugetlbpage.c  |  2 +-
 arch/powerpc/mm/hugetlbpage.c |  2 +-
 arch/s390/mm/hugetlbpage.c    |  2 +-
 arch/sh/mm/hugetlbpage.c      |  2 +-
 arch/sparc/mm/hugetlbpage.c   |  2 +-
 arch/tile/mm/hugetlbpage.c    |  2 +-
 arch/x86/mm/hugetlbpage.c     |  2 +-
 fs/userfaultfd.c              |  7 +++++--
 include/linux/hugetlb.h       |  2 +-
 mm/hugetlb.c                  | 18 +++++++++---------
 mm/page_vma_mapped.c          |  2 +-
 mm/pagewalk.c                 |  2 +-
 16 files changed, 45 insertions(+), 41 deletions(-)

-- 
2.11.0

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-03-24 11:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-23 12:58 [RFC PATCH 0/2] Add hstate parameter to huge_pte_offset() Punit Agrawal
2017-03-23 12:58 ` [RFC PATCH 1/2] mm/hugetlb.c: add " Punit Agrawal
2017-03-23 12:58 ` [RFC PATCH 2/2] arm64: hugetlbpages: Correctly handle swap entries in huge_pte_offset() Punit Agrawal
2017-03-23 20:55 ` [RFC PATCH 0/2] Add hstate parameter to huge_pte_offset() Mike Kravetz
2017-03-24 10:37   ` Kirill A. Shutemov
2017-03-24 11:23     ` Punit Agrawal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox