bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC 0/1] add parallelism to test_progs
@ 2021-08-27 23:13 Yucong Sun
  2021-08-27 23:13 ` [RFC 1/1] selftests/bpf: Add " Yucong Sun
  2021-08-31  4:03 ` [RFC 0/1] add " Andrii Nakryiko
  0 siblings, 2 replies; 5+ messages in thread
From: Yucong Sun @ 2021-08-27 23:13 UTC (permalink / raw)
  To: andrii; +Cc: sunyucong, bpf, Yucong Sun

This patch added a optional "-p" to test_progs to run tests in multiple
process, speeding up the tests.

Example:

time ./test_progs
real    5m51.393s
user    0m4.695s
sys    5m48.055s

time ./test_progs -p 16 (on a 8 core vm)
real    3m45.673s
user    0m4.434s
sys    5m47.465s

The feedback area I'm looking for :

  1.Some tests are taking too long to run (for example:
  bpf_verif_scale/pyperf* takes almost 80% of the total runtime). If we
  need a work-stealing pool mechanism it would be a bigger change.

  2. The tests output from workers are currently interleaved from all
  workers, making it harder to read, one option would be redirect all
  outputs onto pipes and have main process collect and print in sequence
  for each worker finish, but that will make seeing real time progress
  harder.

  3. If main process want to collect tests results from worker, I plan
  to have each worker writes a stats file to /tmp, or I can use IPC, any
  preference?

  4. Some tests would fail if run in parallel, I think we would need to
  pin some tasks onto worker 0.

Yucong Sun (1):
  selftests/bpf: Add parallelism to test_progs

 tools/testing/selftests/bpf/test_progs.c | 94 ++++++++++++++++++++++--
 tools/testing/selftests/bpf/test_progs.h |  3 +
 2 files changed, 91 insertions(+), 6 deletions(-)

-- 
2.30.2


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

end of thread, other threads:[~2021-08-31 12:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-27 23:13 [RFC 0/1] add parallelism to test_progs Yucong Sun
2021-08-27 23:13 ` [RFC 1/1] selftests/bpf: Add " Yucong Sun
2021-08-31  3:37   ` Andrii Nakryiko
2021-08-31 12:29     ` sunyucong
2021-08-31  4:03 ` [RFC 0/1] add " Andrii Nakryiko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).