linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH uprobe, thp 0/4] THP aware uprobe
@ 2019-05-29 21:20 Song Liu
  2019-05-29 21:20 ` [PATCH uprobe, thp 1/4] mm, thp: allow preallocate pgtable for split_huge_pmd_address() Song Liu
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Song Liu @ 2019-05-29 21:20 UTC (permalink / raw)
  To: linux-kernel, linux-mm
  Cc: namit, peterz, oleg, rostedt, mhiramat, matthew.wilcox,
	kirill.shutemov, kernel-team, william.kucharski, chad.mynhier,
	mike.kravetz, Song Liu

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


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

end of thread, other threads:[~2019-05-31  7:00 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-29 21:20 [PATCH uprobe, thp 0/4] THP aware uprobe Song Liu
2019-05-29 21:20 ` [PATCH uprobe, thp 1/4] mm, thp: allow preallocate pgtable for split_huge_pmd_address() Song Liu
2019-05-30 11:10   ` Kirill A. Shutemov
2019-05-30 11:14     ` Kirill A. Shutemov
2019-05-30 17:23       ` Song Liu
2019-05-29 21:20 ` [PATCH uprobe, thp 2/4] uprobe: use original page when all uprobes are removed Song Liu
2019-05-30 11:17   ` Kirill A. Shutemov
2019-05-30 17:18     ` Song Liu
2019-05-29 21:20 ` [PATCH uprobe, thp 3/4] uprobe: support huge page by only splitting the pmd Song Liu
2019-05-30 11:08   ` William Kucharski
2019-05-30 17:24     ` Song Liu
2019-05-30 12:14   ` Kirill A. Shutemov
2019-05-30 17:37     ` Song Liu
2019-05-29 21:20 ` [PATCH uprobe, thp 4/4] uprobe: collapse THP pmd after removing all uprobes Song Liu
2019-05-30 12:20   ` Kirill A. Shutemov
2019-05-30 17:26     ` Song Liu
2019-05-31  7:00       ` 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