From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751153AbdAXQ3g (ORCPT ); Tue, 24 Jan 2017 11:29:36 -0500 Received: from mga02.intel.com ([134.134.136.20]:55057 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750776AbdAXQ3e (ORCPT ); Tue, 24 Jan 2017 11:29:34 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,278,1477983600"; d="scan'208";a="217065667" From: "Kirill A. Shutemov" To: Andrea Arcangeli , Hugh Dickins , Rik van Riel , Andrew Morton Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, "Kirill A. Shutemov" Subject: [PATCH 00/12] Fix few rmap-related THP bugs Date: Tue, 24 Jan 2017 19:28:12 +0300 Message-Id: <20170124162824.91275-1-kirill.shutemov@linux.intel.com> X-Mailer: git-send-email 2.11.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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