]> git.itanic.dy.fi Git - linux-stable/commit
selftests/resctrl: Simplify span lifetime
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Mon, 4 Sep 2023 09:53:35 +0000 (12:53 +0300)
committerShuah Khan <skhan@linuxfoundation.org>
Fri, 13 Oct 2023 20:28:44 +0000 (14:28 -0600)
commitb1a901e078c4ee4a6fe13021c4577ef5f3155251
tree2b7eaa844d52e762096aba8bb2662b4d6f91ea2f
parent47e36f16c7846bf3627ff68525e02555c53dc99e
selftests/resctrl: Simplify span lifetime

struct resctrl_val_param contains span member. resctrl_val(), however,
never uses it because the value of span is embedded into the default
benchmark command and parsed from it by run_benchmark().

Remove span from resctrl_val_param. Provide DEFAULT_SPAN for the code
that needs it. CMT and CAT tests communicate span that is different
from the DEFAULT_SPAN between their internal functions which is
converted into passing it directly as a parameter.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tested-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Reviewed-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>
Reviewed-by: "Wieczor-Retman, Maciej" <maciej.wieczor-retman@intel.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/resctrl/cache.c
tools/testing/selftests/resctrl/cat_test.c
tools/testing/selftests/resctrl/cmt_test.c
tools/testing/selftests/resctrl/mbm_test.c
tools/testing/selftests/resctrl/resctrl.h
tools/testing/selftests/resctrl/resctrl_tests.c