linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv2 00/12] Fix few rmap-related THP bugs
@ 2017-01-25 18:25 Kirill A. Shutemov
  2017-01-25 18:25 ` [PATCHv2 01/12] uprobes: split THPs before trying replace them Kirill A. Shutemov
                   ` (11 more replies)
  0 siblings, 12 replies; 20+ messages in thread
From: Kirill A. Shutemov @ 2017-01-25 18:25 UTC (permalink / raw)
  To: Andrea Arcangeli, Hugh Dickins, Rik van Riel, Andrew Morton
  Cc: linux-mm, linux-kernel, Kirill A. Shutemov

The patch fixes handing PTE-mapped THPs in page_referenced() and
page_idle_clear_pte_refs().

To achieve that I've intrdocued new helper -- page_vma_mapped_walk() -- which
replaces all page_check_address{,_transhuge}() and covers all THP cases.

Patchset overview:
  - First patch fixes one uprobe bug (unrelated to the rest of the
    patchset, just spotted it at the same time);

  - Patches 2-5 fix handling PTE-mapped THPs in page_referenced(),
    page_idle_clear_pte_refs() and rmap core;

  - Patches 6-12 convert all page_check_address{,_transhuge}() users (plus
    remove_migration_pte()) to page_vma_mapped_walk() and drop unused helpers.

I think the fixes are not critical enough for stable@ as they don't lead
to crashes or hangs, only suboptimal behaviour.

Please review and consider applying.

v2:
  - address feedback from Andrew;
  - fix build errors noticed by 0-day testing.

Kirill A. Shutemov (12):
  uprobes: split THPs before trying replace them
  mm: introduce page_vma_mapped_walk()
  mm: fix handling PTE-mapped THPs in page_referenced()
  mm: fix handling PTE-mapped THPs in page_idle_clear_pte_refs()
  mm, rmap: check all VMAs that PTE-mapped THP can be part of
  mm: convert page_mkclean_one() to page_vma_mapped_walk()
  mm: convert try_to_unmap_one() to page_vma_mapped_walk()
  mm, ksm: convert write_protect_page() to page_vma_mapped_walk()
  mm, uprobes: convert __replace_page() to page_vma_mapped_walk()
  mm: convert page_mapped_in_vma() to page_vma_mapped_walk()
  mm: drop page_check_address{,_transhuge}
  mm: convert remove_migration_pte() to page_vma_mapped_walk()

 include/linux/rmap.h    |  52 ++---
 kernel/events/uprobes.c |  26 ++-
 mm/Makefile             |   6 +-
 mm/huge_memory.c        |  25 +--
 mm/internal.h           |   9 +-
 mm/ksm.c                |  34 +--
 mm/migrate.c            | 104 ++++-----
 mm/page_idle.c          |  34 +--
 mm/page_vma_mapped.c    | 211 ++++++++++++++++++
 mm/rmap.c               | 574 +++++++++++++++++++-----------------------------
 10 files changed, 566 insertions(+), 509 deletions(-)
 create mode 100644 mm/page_vma_mapped.c

-- 
2.11.0

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

end of thread, other threads:[~2017-01-26  7:32 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-25 18:25 [PATCHv2 00/12] Fix few rmap-related THP bugs Kirill A. Shutemov
2017-01-25 18:25 ` [PATCHv2 01/12] uprobes: split THPs before trying replace them Kirill A. Shutemov
2017-01-25 18:25 ` [PATCHv2 02/12] mm: introduce page_vma_mapped_walk() Kirill A. Shutemov
2017-01-25 20:38   ` Kirill A. Shutemov
2017-01-25 22:42   ` Kirill A. Shutemov
2017-01-25 18:25 ` [PATCHv2 03/12] mm: fix handling PTE-mapped THPs in page_referenced() Kirill A. Shutemov
2017-01-25 18:25 ` [PATCHv2 04/12] mm: fix handling PTE-mapped THPs in page_idle_clear_pte_refs() Kirill A. Shutemov
2017-01-25 18:25 ` [PATCHv2 05/12] mm, rmap: check all VMAs that PTE-mapped THP can be part of Kirill A. Shutemov
2017-01-26  6:56   ` Hillf Danton
2017-01-25 18:25 ` [PATCHv2 06/12] mm: convert page_mkclean_one() to page_vma_mapped_walk() Kirill A. Shutemov
2017-01-25 18:25 ` [PATCHv2 07/12] mm: convert try_to_unmap_one() " Kirill A. Shutemov
2017-01-25 19:02   ` kbuild test robot
2017-01-25 19:05   ` kbuild test robot
2017-01-25 22:46   ` Kirill A. Shutemov
2017-01-25 18:25 ` [PATCHv2 08/12] mm, ksm: convert write_protect_page() " Kirill A. Shutemov
2017-01-25 18:25 ` [PATCHv2 09/12] mm, uprobes: convert __replace_page() " Kirill A. Shutemov
2017-01-25 18:25 ` [PATCHv2 10/12] mm: convert page_mapped_in_vma() " Kirill A. Shutemov
2017-01-26  7:31   ` Hillf Danton
2017-01-25 18:25 ` [PATCHv2 11/12] mm: drop page_check_address{,_transhuge} Kirill A. Shutemov
2017-01-25 18:25 ` [PATCHv2 12/12] mm: convert remove_migration_pte() to page_vma_mapped_walk() Kirill A. Shutemov

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