lib: objpool test module added
authorwuqiang.matt <wuqiang.matt@bytedance.com>
Tue, 17 Oct 2023 13:56:51 +0000 (21:56 +0800)
committerMasami Hiramatsu (Google) <mhiramat@kernel.org>
Wed, 18 Oct 2023 13:36:03 +0000 (22:36 +0900)
commit92f90d3b0d5e384f218c8068138ed1b3afa025af
treec3a80c8f064eb6cafb87b6a2fa285ffc051b560d
parentb4edb8d2d4647a71a246d91fe34ff25c2c5f3481
lib: objpool test module added

The test_objpool module (test_objpool) will run several testcases
for objpool stress and performance evaluation. Each testcase will
have all available cpu cores involved to create a situation of high
parallel and high contention.

As of now there are 5 groups and 5 * 2 testcases in total:

1) group 1: synchronous mode
   objpool is managed synchronously, that is, all objects are to be
   reclaimed before objpool finalization and the objpool owner makes
   sure of it. All threads on different cores run in the same pace
2) group 2: synchronous mode + hrtimer
   this case have 2 customers: normal threads and hrtimer softirqs
3) group 3: synchronous + overrun mode
   This test group is mainly for performance evaluation of missing
   cases when pre-allocated objects are less than the requested
4) group 4: asynchronous mode
   This case is just an emulation of kretprobe, with refcount used
   to control the objpool lifecycle
5) group 5: asynchronous mode with hrtimer
   hrtimer softirq is introduced to stress async objpool operations

Link: https://lore.kernel.org/all/20231017135654.82270-3-wuqiang.matt@bytedance.com/
Signed-off-by: wuqiang.matt <wuqiang.matt@bytedance.com>
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
lib/Kconfig.debug
lib/Makefile
lib/test_objpool.c [new file with mode: 0644]