[PATCH uprobe, thp 0/4] THP aware uprobe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 only split PMD
for uprobe. After all uprobes within the THP are removed, the PTEs are
regrouped into huge PMD.

Note that, with uprobes attached, the process runs with PTEs for the huge
page. The performance benefit of THP is recovered _after_ all uprobes on
the huge page are detached.

This set (plus a few small debug patches) is also available at

   https://github.com/liu-song-6/linux/tree/uprobe-thp

Song Liu (4):
  mm, thp: allow preallocate pgtable for split_huge_pmd_address()
  uprobe: use original page when all uprobes are removed
  uprobe: support huge page by only splitting the pmd
  uprobe: collapse THP pmd after removing all uprobes

 include/linux/huge_mm.h |  22 ++++++++-
 kernel/events/uprobes.c |  82 +++++++++++++++++++++++++------
 mm/huge_memory.c        | 104 ++++++++++++++++++++++++++++++++++++----
 mm/rmap.c               |   2 +-
 4 files changed, 183 insertions(+), 27 deletions(-)

--
2.17.1




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux