numam-spdk/test/event
Maciej Szwed 97c5373fc7 test/scheduler: make activity of a thread % of time period
So far the test application was mostly used for cases with
single active thread on a core.
Setting activity as percentage of all poller operations worked
fine for those cases.

This patch changes the thread activity to mean percentage of
a set time period.
Which equals to the maximum load a thread will see when being
alone on the core.

Right now g_core_time_period is set to 100ms, and is the
maximum execution time for all threads on a core when
thread activity is set to 100%.
g_timeslice is set to 100us and is the execution time of
single thread poll.

Consider following scenario:

Before the patch
Thread1	Activity 70%	Busy 70		Idle 30	Load 70%
Thread2	Activity 60%	Busy 60		Idle 40	Load 60%
Core			Busy 130	Idle 70	Load 65%

After the patch
Thread1	Activity 70%	Busy 100	Idle 0	Load 100%
Thread2	Activity 60%	Busy 100	Idle 0	Load 100%
Core			Busy 200	Idle 0	Load 100%

Additionally increased period of sleeping from 1us to 100us,
to offset the time needed for additional operations
during thread poll.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I027432db1bea570dd58829eeccf7dd8bb06bf249
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7474
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-07-12 21:58:56 +00:00
..
app_repeat event: Shift subsystem initialization code to a separate library 2021-05-24 10:12:50 +00:00
event_perf init: Declare a formal public API 2021-05-26 09:13:34 +00:00
reactor build: use DEPDIRS variables to build SPDK_LIB_LIST 2020-12-18 09:40:01 +00:00
reactor_perf build: use DEPDIRS variables to build SPDK_LIB_LIST 2020-12-18 09:40:01 +00:00
scheduler test/scheduler: make activity of a thread % of time period 2021-07-12 21:58:56 +00:00
event.sh test/scheduler: application to test behaviour of schedulers 2021-01-22 18:31:25 +00:00
Makefile test/scheduler: application to test behaviour of schedulers 2021-01-22 18:31:25 +00:00