From: Song Liu <songliubraving@fb.com>
To: <linux-kernel@vger.kernel.org>, <linux-mm@kvack.org>
Cc: <matthew.wilcox@oracle.com>, <kirill.shutemov@linux.intel.com>,
<peterz@infradead.org>, <oleg@redhat.com>, <rostedt@goodmis.org>,
<kernel-team@fb.com>, <william.kucharski@oracle.com>,
Song Liu <songliubraving@fb.com>
Subject: [PATCH v7 0/4] THP aware uprobe
Date: Tue, 25 Jun 2019 16:53:21 -0700 [thread overview]
Message-ID: <20190625235325.2096441-1-songliubraving@fb.com> (raw)
This set makes uprobe aware of THPs.
Currently, when uprobe is attached to text on THP, the page is split by
FOLL_SPLIT. As a result, uprobe eliminates the performance benefit of THP.
This set makes uprobe THP-aware. Instead of FOLL_SPLIT, we introduces
FOLL_SPLIT_PMD, which only split PMD for uprobe.
TODO (temporarily removed in v7):
After all uprobes within the THP are removed, regroup the PTE-mapped pages
into huge PMD.
This set (plus a few THP patches) is also available at
https://github.com/liu-song-6/linux/tree/uprobe-thp
Changes v6 => v7:
1. Include Acked-by from Kirill A. Shutemov for the first 4 patches;
2. Keep only the first 4 patches (while I working on improving the last 2).
Changes v5 => v6:
1. Enable khugepaged to collapse pmd for pte-mapped THP
(Kirill A. Shutemov).
2. uprobe asks khuagepaged to collaspe pmd. (Kirill A. Shutemov)
Note: Theast two patches in v6 the set apply _after_ v7 of set "Enable THP
for text section of non-shmem files"
Changes v4 => v5:
1. Propagate pte_alloc() error out of follow_pmd_mask().
Changes since v3:
1. Simplify FOLL_SPLIT_PMD case in follow_pmd_mask(), (Kirill A. Shutemov)
2. Fix try_collapse_huge_pmd() to match change in follow_pmd_mask().
Changes since v2:
1. For FOLL_SPLIT_PMD, populated the page table in follow_pmd_mask().
2. Simplify logic in uprobe_write_opcode. (Oleg Nesterov)
3. Fix page refcount handling with FOLL_SPLIT_PMD.
4. Much more testing, together with THP on ext4 and btrfs (sending in
separate set).
5. Rebased.
Changes since v1:
1. introduces FOLL_SPLIT_PMD, instead of modifying split_huge_pmd*();
2. reuse pages_identical() from ksm.c;
3. rewrite most of try_collapse_huge_pmd().
Song Liu (4):
mm: move memcmp_pages() and pages_identical()
uprobe: use original page when all uprobes are removed
mm, thp: introduce FOLL_SPLIT_PMD
uprobe: use FOLL_SPLIT_PMD instead of FOLL_SPLIT
include/linux/mm.h | 8 +++++++
kernel/events/uprobes.c | 51 +++++++++++++++++++++++++++++++----------
mm/gup.c | 8 +++++--
mm/ksm.c | 18 ---------------
mm/util.c | 13 +++++++++++
5 files changed, 66 insertions(+), 32 deletions(-)
--
2.17.1
next reply other threads:[~2019-06-25 23:53 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-25 23:53 Song Liu [this message]
2019-06-25 23:53 ` [PATCH v7 1/4] mm: move memcmp_pages() and pages_identical() Song Liu
2019-06-25 23:53 ` [PATCH v7 2/4] uprobe: use original page when all uprobes are removed Song Liu
2019-06-26 6:00 ` Srikar Dronamraju
2019-07-15 15:25 ` Oleg Nesterov
2019-07-24 8:23 ` Song Liu
2019-07-24 8:57 ` Oleg Nesterov
2019-06-25 23:53 ` [PATCH v7 3/4] mm, thp: introduce FOLL_SPLIT_PMD Song Liu
2019-06-25 23:53 ` [PATCH v7 4/4] uprobe: use FOLL_SPLIT_PMD instead of FOLL_SPLIT Song Liu
2019-06-26 6:00 ` Srikar Dronamraju
2019-06-27 6:31 ` Song Liu
2019-06-26 0:03 ` [PATCH v7 0/4] THP aware uprobe Song Liu
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=20190625235325.2096441-1-songliubraving@fb.com \
--to=songliubraving@fb.com \
--cc=kernel-team@fb.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=matthew.wilcox@oracle.com \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=william.kucharski@oracle.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;
as well as URLs for NNTP newsgroup(s).