copy/ioat: Change the default of IOAT from Enabled to Disabled
This patch changes the default setting of IOAT copy engine from Enabled to Disabled. Accordingly this patch changes the config file specification for IOAT copy engine from "Disable Yes/No" to "Enable No/Yes". Subsequent patches will add a new JSON RPC to configure IOAT copy engine dynamically. Change-Id: I754990cbb6ecc096953dd2fb9d34366b91111bf8 Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-on: https://review.gerrithub.io/410757 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@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
46a3d50baa
commit
239e63be7d
@ -40,6 +40,12 @@ Results are recorded in the `make.log` file.
|
||||
To enable type: 'git config core.hooksPath .githooks'. To override after configuration use
|
||||
the `git --no-verify` flag.
|
||||
|
||||
### IOAT
|
||||
|
||||
IOAT for copy engine is disabled by default. It can be enabled by specifying the Enable
|
||||
option with "Yes" in `[Ioat]` section of the configuration file. The Disable option is
|
||||
now deprecated and will be removed in a future release.
|
||||
|
||||
## v18.04: Logical Volume Snapshot/Clone, iSCSI Initiator, Bdev QoS, VPP Userspace TCP/IP
|
||||
|
||||
### vhost
|
||||
|
@ -121,9 +121,10 @@
|
||||
|
||||
# Users may change this section to create a different number or size of
|
||||
# malloc LUNs.
|
||||
# If the system has hardware DMA engine, it will use an IOAT
|
||||
# (i.e. Crystal Beach DMA) channel to do the copy instead of memcpy.
|
||||
# Of course, users can disable offload even it is available.
|
||||
# If the system has hardware DMA engine, it can use an IOAT
|
||||
# (i.e. Crystal Beach DMA) channel to do the copy instead of memcpy
|
||||
# by specifying "Enable Yes" in [Ioat] section.
|
||||
# Offload is disabled by default even it is available.
|
||||
[Malloc]
|
||||
# Number of Malloc targets
|
||||
NumberOfLuns 3
|
||||
@ -132,11 +133,12 @@
|
||||
# Block size. Default is 512 bytes.
|
||||
BlockSize 4096
|
||||
|
||||
# Users may not want to use offload even it is available.
|
||||
# Users can use offload by specifying "Enable Yes" in this section
|
||||
# if it is available.
|
||||
# Users may use the whitelist to initialize specified devices, IDS
|
||||
# uses BUS:DEVICE.FUNCTION to identify each Ioat channel.
|
||||
[Ioat]
|
||||
Disable Yes
|
||||
Enable No
|
||||
Whitelist 00:04.0
|
||||
Whitelist 00:04.1
|
||||
|
||||
|
@ -17,6 +17,6 @@
|
||||
#ReactorMask 0x1
|
||||
|
||||
[Ioat]
|
||||
Disable Yes
|
||||
Enable No
|
||||
|
||||
# [Nvme] section will get appended here by scripts/gen_nvme.sh.
|
||||
|
@ -29,11 +29,12 @@
|
||||
# Set to 0xFFFFFFFFFFFFFFFF to enable all tracepoint groups.
|
||||
#TpointGroupMask 0x0
|
||||
|
||||
# Users may not want to use offload even it is available.
|
||||
# Users can use offload by specifying "Enable Yes" in this section
|
||||
# if it is available.
|
||||
# Users may use the whitelist to initialize specified devices, IDS
|
||||
# uses BUS:DEVICE.FUNCTION to identify each Ioat channel.
|
||||
[Ioat]
|
||||
Disable Yes
|
||||
Enable No
|
||||
#Whitelist 00:04.0
|
||||
#Whitelist 00:04.1
|
||||
|
||||
@ -51,9 +52,10 @@
|
||||
|
||||
# Users may change this section to create a different number or size of
|
||||
# malloc LUNs.
|
||||
# If the system has hardware DMA engine, it will use an IOAT
|
||||
# (i.e. Crystal Beach DMA) channel to do the copy instead of memcpy.
|
||||
# Of course, users can disable offload even it is available.
|
||||
# If the system has hardware DMA engine, it can use an IOAT
|
||||
# (i.e. Crystal Beach DMA) channel to do the copy instead of memcpy
|
||||
# by specifying "Enable Yes" in [Ioat] section.
|
||||
# Offload is disabled by default even it is available.
|
||||
[Malloc]
|
||||
# Number of Malloc targets
|
||||
NumberOfLuns 3
|
||||
|
@ -44,7 +44,7 @@
|
||||
|
||||
#define IOAT_MAX_CHANNELS 64
|
||||
|
||||
static bool g_ioat_disable = false;
|
||||
static bool g_ioat_enable = false;
|
||||
|
||||
struct ioat_probe_ctx {
|
||||
int num_whitelist_devices;
|
||||
@ -282,13 +282,24 @@ static int
|
||||
copy_engine_ioat_init(void)
|
||||
{
|
||||
struct spdk_conf_section *sp = spdk_conf_find_section(NULL, "Ioat");
|
||||
const char *pci_bdf;
|
||||
const char *val, *pci_bdf;
|
||||
int i;
|
||||
|
||||
if (sp != NULL) {
|
||||
if (spdk_conf_section_get_boolval(sp, "Disable", false)) {
|
||||
g_ioat_disable = true;
|
||||
/* Disable Ioat */
|
||||
if (spdk_conf_section_get_boolval(sp, "Enable", false)) {
|
||||
g_ioat_enable = true;
|
||||
/* Enable Ioat */
|
||||
}
|
||||
|
||||
val = spdk_conf_section_get_val(sp, "Disable");
|
||||
if (val != NULL) {
|
||||
SPDK_WARNLOG("\"Disable\" option is deprecated and will be removed in a future release.\n");
|
||||
SPDK_WARNLOG("IOAT is now disabled by default. It may be enabled by \"Enable Yes\"\n");
|
||||
|
||||
if (g_ioat_enable && (strcasecmp(val, "Yes") == 0)) {
|
||||
SPDK_ERRLOG("\"Enable Yes\" and \"Disable Yes\" cannot be set at the same time\n");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
/* Init the whitelist */
|
||||
@ -307,7 +318,7 @@ copy_engine_ioat_init(void)
|
||||
}
|
||||
}
|
||||
|
||||
if (g_ioat_disable) {
|
||||
if (!g_ioat_enable) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -329,8 +340,8 @@ copy_engine_ioat_init(void)
|
||||
" # Users may use the whitelist to initialize specified devices, IDS\n" \
|
||||
" # uses BUS:DEVICE.FUNCTION to identify each Ioat channel.\n"
|
||||
|
||||
#define COPY_ENGINE_IOAT_DISABLE_TMPL \
|
||||
" Disable %s\n"
|
||||
#define COPY_ENGINE_IOAT_ENABLE_TMPL \
|
||||
" Enable %s\n"
|
||||
|
||||
#define COPY_ENGINE_IOAT_WHITELIST_TMPL \
|
||||
" Whitelist %.4" PRIx16 ":%.2" PRIx8 ":%.2" PRIx8 ".%" PRIx8 "\n"
|
||||
@ -342,7 +353,7 @@ copy_engine_ioat_config_text(FILE *fp)
|
||||
struct spdk_pci_addr *dev;
|
||||
|
||||
fprintf(fp, COPY_ENGINE_IOAT_HEADER_TMPL);
|
||||
fprintf(fp, COPY_ENGINE_IOAT_DISABLE_TMPL, g_ioat_disable ? "Yes" : "No");
|
||||
fprintf(fp, COPY_ENGINE_IOAT_ENABLE_TMPL, g_ioat_enable ? "Yes" : "No");
|
||||
|
||||
for (i = 0; i < g_probe_ctx.num_whitelist_devices; i++) {
|
||||
dev = &g_probe_ctx.whitelist[i];
|
||||
|
@ -19,7 +19,7 @@
|
||||
AIO /tmp/aiofile AIO1 2048
|
||||
|
||||
[Ioat]
|
||||
Disable Yes
|
||||
Enable No
|
||||
|
||||
[QoS]
|
||||
# QoS section defines limitation on performance
|
||||
|
@ -1,2 +1,2 @@
|
||||
[Ioat]
|
||||
Disable Yes
|
||||
Enable No
|
||||
|
@ -1,7 +1,7 @@
|
||||
[Global]
|
||||
|
||||
[Ioat]
|
||||
Disable Yes
|
||||
Enable No
|
||||
|
||||
[Nvme]
|
||||
HotplugEnable Yes
|
||||
|
@ -21,4 +21,4 @@
|
||||
Queues 8
|
||||
|
||||
[Ioat]
|
||||
Disable Yes
|
||||
Enable No
|
||||
|
@ -2,4 +2,4 @@
|
||||
Enable Yes
|
||||
|
||||
[Ioat]
|
||||
Disable Yes
|
||||
Enable No
|
||||
|
Loading…
Reference in New Issue
Block a user