[v7,0/5] lib,kprobes: kretprobe scalability improvement

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

Message

wuqiang.matt Dec. 12, 2022, 12:31 p.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 scalability of kretprobed routines.

Changes from v6 (https://lore.kernel.org/lkml/20221108071443.258794-1-wuqiang.matt@bytedance.com/):
  1) objpool: implementation simplified as Masami advised
  2) rethook_alloc: error codes returning supported (ERR_PTR)
  3) MAINTAINERS: support added for objpool files
  4) synced to latest 6.1 with x86_64/x86/aarch64 verified

wuqiang (5):
  lib: objpool added: ring-array based lockless MPMC queue
  lib: objpool test module added
  kprobes: kretprobe scalability improvement with objpool
  kprobes: freelist.h removed
  MAINTAINERS: objpool added

 MAINTAINERS              |   7 +
 include/linux/freelist.h | 129 --------
 include/linux/kprobes.h  |   9 +-
 include/linux/objpool.h  | 109 ++++++
 include/linux/rethook.h  |  14 +-
 kernel/kprobes.c         | 101 +++---
 kernel/trace/fprobe.c    |  37 +--
 kernel/trace/rethook.c   |  99 +++---
 lib/Kconfig.debug        |  11 +
 lib/Makefile             |   4 +-
 lib/objpool.c            | 320 ++++++++++++++++++
 lib/test_objpool.c       | 696 +++++++++++++++++++++++++++++++++++++++
 12 files changed, 1264 insertions(+), 272 deletions(-)
 delete mode 100644 include/linux/freelist.h
 create mode 100644 include/linux/objpool.h
 create mode 100644 lib/objpool.c
 create mode 100644 lib/test_objpool.c