lib/event: remove deprecated ReactorMask from legacy config
Legacy INI configuration is being removed this release. This patch removes one of its options and always uses the SPDK_APP_DPDK_DEFAULT_CORE_MASK as default core mask. That can only be overwriten by -m/--cpumask arguments in app. In bdevperf there was no reason to set reactor_mask to NULL, as that was then still using the defaults. Meanwhile bdev_svc will now check if user provided different string via command line args to know if it should unaffinitize its thread. Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: Id882f8d7dbdd07b7743bd5981c37daa888b7872a Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4619 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
5b1e154a5c
commit
9103bca73b
@ -290,7 +290,7 @@ spdk_app_opts_init(struct spdk_app_opts *opts)
|
||||
opts->mem_size = SPDK_APP_DPDK_DEFAULT_MEM_SIZE;
|
||||
opts->master_core = SPDK_APP_DPDK_DEFAULT_MASTER_CORE;
|
||||
opts->mem_channel = SPDK_APP_DPDK_DEFAULT_MEM_CHANNEL;
|
||||
opts->reactor_mask = NULL;
|
||||
opts->reactor_mask = SPDK_APP_DPDK_DEFAULT_CORE_MASK;
|
||||
opts->base_virtaddr = SPDK_APP_DPDK_DEFAULT_BASE_VIRTADDR;
|
||||
opts->print_level = SPDK_APP_DEFAULT_LOG_PRINT_LEVEL;
|
||||
opts->rpc_addr = SPDK_DEFAULT_RPC_ADDR;
|
||||
@ -435,16 +435,6 @@ app_read_config_file_global_params(struct spdk_app_opts *opts)
|
||||
}
|
||||
}
|
||||
|
||||
if (opts->reactor_mask == NULL) {
|
||||
if (sp && spdk_conf_section_get_val(sp, "ReactorMask")) {
|
||||
SPDK_ERRLOG("ReactorMask config option is deprecated. Use -m/--cpumask\n"
|
||||
"command line parameter instead.\n");
|
||||
opts->reactor_mask = spdk_conf_section_get_val(sp, "ReactorMask");
|
||||
} else {
|
||||
opts->reactor_mask = SPDK_APP_DPDK_DEFAULT_CORE_MASK;
|
||||
}
|
||||
}
|
||||
|
||||
if (!opts->no_pci && sp) {
|
||||
opts->no_pci = spdk_conf_section_get_boolval(sp, "NoPci", false);
|
||||
}
|
||||
@ -666,11 +656,6 @@ spdk_app_start(struct spdk_app_opts *opts, spdk_msg_fn start_fn,
|
||||
spdk_log_open(opts->log);
|
||||
SPDK_NOTICELOG("Total cores available: %d\n", spdk_env_get_core_count());
|
||||
|
||||
/*
|
||||
* If mask not specified on command line or in configuration file,
|
||||
* reactor_mask will be 0x1 which will enable core 0 to run one
|
||||
* reactor.
|
||||
*/
|
||||
if ((rc = spdk_reactors_init()) != 0) {
|
||||
SPDK_ERRLOG("Reactor Initilization failed: rc = %d\n", rc);
|
||||
return 1;
|
||||
|
@ -81,11 +81,13 @@ main(int argc, char **argv)
|
||||
{
|
||||
int rc;
|
||||
struct spdk_app_opts opts = {};
|
||||
const char *reactor_mask = "0x1";
|
||||
|
||||
/* default value in opts structure */
|
||||
spdk_app_opts_init(&opts);
|
||||
|
||||
opts.name = "bdev_svc";
|
||||
opts.reactor_mask = reactor_mask;
|
||||
opts.shutdown_cb = bdev_svc_shutdown;
|
||||
|
||||
if ((rc = spdk_app_parse_args(argc, argv, &opts, "", NULL,
|
||||
@ -100,7 +102,7 @@ main(int argc, char **argv)
|
||||
* in the bdev_svc_start routine, which will allow the scheduler to move this
|
||||
* thread so it doesn't conflict with pinned threads in the secondary processes.
|
||||
*/
|
||||
if (opts.reactor_mask == NULL) {
|
||||
if (opts.reactor_mask == reactor_mask) {
|
||||
g_unaffinitize_thread = true;
|
||||
}
|
||||
|
||||
|
@ -2110,7 +2110,6 @@ main(int argc, char **argv)
|
||||
spdk_app_opts_init(&opts);
|
||||
opts.name = "bdevperf";
|
||||
opts.rpc_addr = NULL;
|
||||
opts.reactor_mask = NULL;
|
||||
opts.shutdown_cb = spdk_bdevperf_shutdown_cb;
|
||||
|
||||
if ((rc = spdk_app_parse_args(argc, argv, &opts, "xzfq:o:t:w:k:ACM:P:S:T:j:", NULL,
|
||||
|
Loading…
Reference in New Issue
Block a user