[v5,0/4] lib,kprobes: kretprobe scalability improvement

Message ID 20221106053441.103199-1-wuqiang.matt@bytedance.com
Headers
Series lib,kprobes: kretprobe scalability improvement |

Message

wuqiang.matt Nov. 6, 2022, 5:34 a.m. UTC
  This patch series introduces a scalable and lockless ring-array based
object pool and replaces the original freelist (a LIFO queue based on
singly linked list) to improve the scalability of kretprobed routines.

Changes from v4:
  1) compiling failure with [-Werror=designated-init]
  2) compiling failure for sparc: prefetch() not defined
  3) comments & codes of objpool routines refined

v4 and more:
  https://lore.kernel.org/all/20221102023012.6362-1-wuqiang.matt@bytedance.com

---
 include/linux/freelist.h |  129 ------------
 include/linux/kprobes.h  |    9 +-
 include/linux/objpool.h  |  153 ++++++++++++++
 include/linux/rethook.h  |   15 +-
 kernel/kprobes.c         |   95 ++++-----
 kernel/trace/fprobe.c    |   17 +-
 kernel/trace/rethook.c   |   80 +++----
 lib/Kconfig.debug        |   11 +
 lib/Makefile             |    4 +-
 lib/objpool.c            |  487 +++++++++++++++++++++++++++++++++++++++++++
 lib/test_objpool.c       | 1052 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 11 files changed, 1802 insertions(+), 250 deletions(-)
 create mode 100644 include/linux/objpool.h
 create mode 100644 lib/objpool.c
 create mode 100644 lib/test_objpool.c
 delete mode 100644 include/linux/freelist.h