numam-spdk/test
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
..
accel_engine accel_engine test: Add the test case for accel_engine. 2021-01-21 15:49:40 +00:00
app nvme: Add spdk_nvme_detach_poll() to simplify a common use case 2021-06-30 22:54:19 +00:00
bdev test: fix nbd test typo and add check 2021-06-23 18:07:46 +00:00
blobfs event: Shift subsystem initialization code to a separate library 2021-05-24 10:12:50 +00:00
blobstore scheduler: Change main core frequency dynamically 2021-01-22 18:31:25 +00:00
common test/pkgdep: update nvme-cli version 2021-07-05 14:36:34 +00:00
compress test/nvmf: use recommended nvmf_create_subsystem rpc 2021-05-20 15:00:22 +00:00
config_converter scripts/config_converter: skip sections not present in legacy config 2021-01-15 08:32:10 +00:00
cpp_headers queue_extras: use SPDK_CONTAINEROF 2019-10-07 15:06:01 +00:00
dd autotest: Run dd tests under SPDK_TEST_URING 2021-05-20 15:15:33 +00:00
dpdk_memory_utility check_format: Ignore shellcheck's SC2128 and SC2178 directives 2021-06-30 22:43:05 +00:00
env test/env_dpdk_post_init: Use spdk_nvme_detach_async() 2021-06-30 22:54:19 +00:00
event test/scheduler: make activity of a thread % of time period 2021-07-12 21:58:56 +00:00
external_code lib/bdev: Added iov to spdk_bdev_zcopy_start 2021-06-04 20:10:07 +00:00
ftl scripts: replace PCI_WHITELIST with PCI_ALLOWED 2020-12-03 09:41:07 +00:00
fuzz test/iscsi: remove VPP tests 2020-08-17 08:19:46 +00:00
interrupt test: add functional test for reactor_set_intr 2021-04-29 07:10:26 +00:00
ioat build: Example applications build to build/example 2020-06-15 15:27:16 +00:00
iscsi_tgt check_format: Fixes for shellcheck's SC2251 directive 2021-06-30 22:43:05 +00:00
json_config nvmf: Add nvmf_set_crdt RPC 2021-06-04 20:02:42 +00:00
lvol test/lvol: rename lvol test script 2020-10-20 08:54:53 +00:00
make build: clarify Makefile for check_so_deps failures 2021-06-25 16:45:17 +00:00
nvme nvme: Add spdk_nvme_detach_poll() to simplify a common use case 2021-06-30 22:54:19 +00:00
nvmf check_format: Fixes for shellcheck's SC2251 directive 2021-06-30 22:43:05 +00:00
ocf check_format: Fixes for shellcheck's SC2251 directive 2021-06-30 22:43:05 +00:00
openstack test/openstack: Enable securitygroup driver in neutron 2021-07-09 19:19:48 +00:00
pmem build: Output executables from the app directory to build/bin 2020-06-15 15:27:16 +00:00
rpc autotest: Use rpc_cmd() for rpc plugin-based tests 2021-04-02 08:22:42 +00:00
rpc_client build: use DEPDIRS variables to build SPDK_LIB_LIST 2020-12-18 09:40:01 +00:00
rpc_plugins autotest: Use rpc_cmd() for rpc plugin-based tests 2021-04-02 08:22:42 +00:00
scheduler test/scheduler: check the idle thread on the main core 2021-07-05 14:35:58 +00:00
setup autotest: Don't override default amount of hugepages on Linux to 8GB 2021-06-24 17:33:10 +00:00
spdkcli autotest: Don't override default amount of hugepages on Linux to 8GB 2021-06-24 17:33:10 +00:00
unit scheduler_dynamic: move thread to least busy core 2021-07-12 21:58:56 +00:00
vhost check_format: Fixes for shellcheck's SC2268 directive 2021-06-30 22:43:05 +00:00
vmd test: replace VMD_WHITELIST with VMD_ALLOWED 2020-12-03 09:41:07 +00:00
Makefile build: add option to disable building unit tests 2020-03-10 09:12:21 +00:00
spdk_cunit.h test: remove leftover spdk_cunit declaration 2018-07-06 22:47:56 +00:00