All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
To: Andrea Arcangeli <aarcange@redhat.com>,
	Hugh Dickins <hughd@google.com>, Rik van Riel <riel@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Subject: [PATCH 00/12] Fix few rmap-related THP bugs
Date: Tue, 24 Jan 2017 19:28:12 +0300	[thread overview]
Message-ID: <20170124162824.91275-1-kirill.shutemov@linux.intel.com> (raw)

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

Kirill A. Shutemov (12):
  uprobes: split THPs before trying replace them
  mm: introduce page_check_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_check_walk()
  mm: convert try_to_unmap_one() to page_check_walk()
  mm, ksm: convert write_protect_page() to page_check_walk()
  mm, uprobes: convert __replace_page() to page_check_walk()
  mm: convert page_mapped_in_vma() to page_check_walk()
  mm: drop page_check_address{,_transhuge}
  mm: convert remove_migration_pte() to page_check_walk()

 include/linux/rmap.h    |  85 ++++---
 kernel/events/uprobes.c |  26 ++-
 mm/Makefile             |   6 +-
 mm/huge_memory.c        |  25 +--
 mm/internal.h           |   9 +-
 mm/ksm.c                |  34 +--
 mm/migrate.c            | 103 ++++-----
 mm/page_check.c         | 178 +++++++++++++++
 mm/page_idle.c          |  34 +--
 mm/rmap.c               | 572 +++++++++++++++++++-----------------------------
 10 files changed, 567 insertions(+), 505 deletions(-)
 create mode 100644 mm/page_check.c

-- 
2.11.0

WARNING: multiple messages have this Message-ID (diff)
From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
To: Andrea Arcangeli <aarcange@redhat.com>,
	Hugh Dickins <hughd@google.com>, Rik van Riel <riel@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Subject: [PATCH 00/12] Fix few rmap-related THP bugs
Date: Tue, 24 Jan 2017 19:28:12 +0300	[thread overview]
Message-ID: <20170124162824.91275-1-kirill.shutemov@linux.intel.com> (raw)

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

Kirill A. Shutemov (12):
  uprobes: split THPs before trying replace them
  mm: introduce page_check_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_check_walk()
  mm: convert try_to_unmap_one() to page_check_walk()
  mm, ksm: convert write_protect_page() to page_check_walk()
  mm, uprobes: convert __replace_page() to page_check_walk()
  mm: convert page_mapped_in_vma() to page_check_walk()
  mm: drop page_check_address{,_transhuge}
  mm: convert remove_migration_pte() to page_check_walk()

 include/linux/rmap.h    |  85 ++++---
 kernel/events/uprobes.c |  26 ++-
 mm/Makefile             |   6 +-
 mm/huge_memory.c        |  25 +--
 mm/internal.h           |   9 +-
 mm/ksm.c                |  34 +--
 mm/migrate.c            | 103 ++++-----
 mm/page_check.c         | 178 +++++++++++++++
 mm/page_idle.c          |  34 +--
 mm/rmap.c               | 572 +++++++++++++++++++-----------------------------
 10 files changed, 567 insertions(+), 505 deletions(-)
 create mode 100644 mm/page_check.c

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

             reply	other threads:[~2017-01-24 16:29 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-24 16:28 Kirill A. Shutemov [this message]
2017-01-24 16:28 ` [PATCH 00/12] Fix few rmap-related THP bugs Kirill A. Shutemov
2017-01-24 16:28 ` [PATCH 01/12] uprobes: split THPs before trying replace them Kirill A. Shutemov
2017-01-24 16:28   ` Kirill A. Shutemov
2017-01-24 18:08   ` Rik van Riel
2017-01-24 18:08     ` Rik van Riel
2017-01-24 21:28   ` Andrew Morton
2017-01-24 21:28     ` Andrew Morton
2017-01-24 22:22     ` Kirill A. Shutemov
2017-01-24 22:22       ` Kirill A. Shutemov
2017-01-24 22:35       ` Andrew Morton
2017-01-24 22:35         ` Andrew Morton
2017-01-24 22:56         ` Kirill A. Shutemov
2017-01-24 22:56           ` Kirill A. Shutemov
2017-01-25 16:55       ` Srikar Dronamraju
2017-01-25 16:55         ` Srikar Dronamraju
2017-01-25 17:44         ` Rik van Riel
2017-01-25 17:44         ` Kirill A. Shutemov
2017-01-25 17:44           ` Kirill A. Shutemov
2017-01-25 18:35         ` Johannes Weiner
2017-01-25 18:35           ` Johannes Weiner
2017-01-25 18:38           ` Kirill A. Shutemov
2017-01-25 18:38             ` Kirill A. Shutemov
2017-01-26  2:54           ` Srikar Dronamraju
2017-01-26  2:54             ` Srikar Dronamraju
2017-01-25 18:22   ` Johannes Weiner
2017-01-25 18:22     ` Johannes Weiner
2017-01-24 16:28 ` [PATCH 02/12] mm: introduce page_check_walk() Kirill A. Shutemov
2017-01-24 16:28   ` Kirill A. Shutemov
2017-01-24 21:41   ` Andrew Morton
2017-01-24 21:41     ` Andrew Morton
2017-01-24 22:50     ` Kirill A. Shutemov
2017-01-24 22:50       ` Kirill A. Shutemov
2017-01-24 22:55       ` Andrew Morton
2017-01-24 22:55         ` Andrew Morton
2017-01-25 17:53         ` Kirill A. Shutemov
2017-01-25 17:53           ` Kirill A. Shutemov
2017-01-25  1:19   ` kbuild test robot
2017-01-25  1:19     ` kbuild test robot
2017-01-25  1:59   ` kbuild test robot
2017-01-25  1:59     ` kbuild test robot
2017-01-24 16:28 ` [PATCH 03/12] mm: fix handling PTE-mapped THPs in page_referenced() Kirill A. Shutemov
2017-01-24 16:28   ` Kirill A. Shutemov
2017-01-24 16:28 ` [PATCH 04/12] mm: fix handling PTE-mapped THPs in page_idle_clear_pte_refs() Kirill A. Shutemov
2017-01-24 16:28   ` Kirill A. Shutemov
2017-01-24 16:28 ` [PATCH 05/12] mm, rmap: check all VMAs that PTE-mapped THP can be part of Kirill A. Shutemov
2017-01-24 16:28   ` Kirill A. Shutemov
2017-01-24 16:28 ` [PATCH 06/12] mm: convert page_mkclean_one() to page_check_walk() Kirill A. Shutemov
2017-01-24 16:28   ` Kirill A. Shutemov
2017-01-25  1:44   ` kbuild test robot
2017-01-25  1:44     ` kbuild test robot
2017-01-25  2:00   ` kbuild test robot
2017-01-25  2:00     ` kbuild test robot
2017-01-24 16:28 ` [PATCH 07/12] mm: convert try_to_unmap_one() " Kirill A. Shutemov
2017-01-24 16:28   ` Kirill A. Shutemov
2017-01-25  3:13   ` kbuild test robot
2017-01-25  3:13     ` kbuild test robot
2017-01-24 16:28 ` [PATCH 08/12] mm, ksm: convert write_protect_page() " Kirill A. Shutemov
2017-01-24 16:28   ` Kirill A. Shutemov
2017-01-24 16:28 ` [PATCH 09/12] mm, uprobes: convert __replace_page() " Kirill A. Shutemov
2017-01-24 16:28   ` Kirill A. Shutemov
2017-01-26  2:58   ` Srikar Dronamraju
2017-01-26  2:58     ` Srikar Dronamraju
2017-01-24 16:28 ` [PATCH 10/12] mm: convert page_mapped_in_vma() " Kirill A. Shutemov
2017-01-24 16:28   ` Kirill A. Shutemov
2017-01-24 16:28 ` [PATCH 11/12] mm: drop page_check_address{,_transhuge} Kirill A. Shutemov
2017-01-24 16:28   ` Kirill A. Shutemov
2017-01-24 16:28 ` [PATCH 12/12] mm: convert remove_migration_pte() to page_check_walk() Kirill A. Shutemov
2017-01-24 16:28   ` Kirill A. Shutemov
2017-01-25  1:54   ` kbuild test robot
2017-01-25  1:54     ` kbuild test robot

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=20170124162824.91275-1-kirill.shutemov@linux.intel.com \
    --to=kirill.shutemov@linux.intel.com \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=hughd@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=riel@redhat.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.