]> www.infradead.org Git - users/jedix/linux-maple.git/commit
selftests/bpf: Add threads to consumer test
authorJiri Olsa <jolsa@kernel.org>
Fri, 8 Nov 2024 13:45:44 +0000 (14:45 +0100)
committerAndrii Nakryiko <andrii@kernel.org>
Mon, 11 Nov 2024 16:18:23 +0000 (08:18 -0800)
commitabaec8341a86e556dff739d093aa30babc498ec5
tree42a01a04c808340b00c882ee1bb3bbf8165cc1a1
parentb1c570adc7a6f6cbb42926d5313036ed1543f00e
selftests/bpf: Add threads to consumer test

With recent uprobe fix [1] the sync time after unregistering uprobe is
much longer and prolongs the consumer test which creates and destroys
hundreds of uprobes.

This change adds 16 threads (which fits the test logic) and speeds up
the test.

Before the change:

  # perf stat --null ./test_progs -t uprobe_multi_test/consumers
  #421/9   uprobe_multi_test/consumers:OK
  #421     uprobe_multi_test:OK
  Summary: 1/1 PASSED, 0 SKIPPED, 0 FAILED

   Performance counter stats for './test_progs -t uprobe_multi_test/consumers':

        28.818778973 seconds time elapsed

         0.745518000 seconds user
         0.919186000 seconds sys

After the change:

  # perf stat --null ./test_progs -t uprobe_multi_test/consumers 2>&1
  #421/9   uprobe_multi_test/consumers:OK
  #421     uprobe_multi_test:OK
  Summary: 1/1 PASSED, 0 SKIPPED, 0 FAILED

   Performance counter stats for './test_progs -t uprobe_multi_test/consumers':

         3.504790814 seconds time elapsed

         0.012141000 seconds user
         0.751760000 seconds sys

[1] commit 87195a1ee332 ("uprobes: switch to RCU Tasks Trace flavor for better performance")

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20241108134544.480660-14-jolsa@kernel.org
tools/testing/selftests/bpf/prog_tests/uprobe_multi_test.c