Lines Matching defs:core
37 /* For core counts <= 63, the message memory pool size is set to
39 * For core counts > 63, the message memory pool size is depended on
40 * number of cores. Per core, it is calculated as SPDK_MSG_MEMPOOL_CACHE_SIZE
42 * on single core (e.g iscsi + nvmf + vhost ). */
99 {"main-core", required_argument, NULL, MAIN_CORE_OPT_IDX},
155 parse_proc_stat(unsigned int core, uint64_t *user, uint64_t *sys, uint64_t *irq)
166 for (i = 0; i <= core + 1; i++) {
176 if (cpu == core) {
189 init_proc_stat(unsigned int core)
193 if (core >= SPDK_CONFIG_MAX_LCORES) {
197 if (parse_proc_stat(core, &usr, &sys, &irq) < 0) {
201 g_initial_stat[core].irq = irq;
202 g_initial_stat[core].usr = usr;
203 g_initial_stat[core].sys = sys;
209 app_get_proc_stat(unsigned int core, uint64_t *usr, uint64_t *sys, uint64_t *irq)
213 if (core >= SPDK_CONFIG_MAX_LCORES) {
217 if (parse_proc_stat(core, &_usr, &_sys, &_irq) < 0) {
221 *irq = _irq - g_initial_stat[core].irq;
222 *usr = _usr - g_initial_stat[core].usr;
223 *sys = _sys - g_initial_stat[core].sys;
283 64 cores, and use 4k per core otherwise */
714 SPDK_ERRLOG("Failed to close lock fd for core %d, errno: %d\n", i, errno);
721 SPDK_ERRLOG("Failed to unlink lock fd for core %d, errno: %d\n", i, errno);
731 /* Set number of core we failed to claim. */
743 uint32_t core;
752 SPDK_ENV_FOREACH_CORE(core) {
753 if (g_core_locks[core] != -1) {
754 /* If this core is locked already, do not try lock it again. */
758 snprintf(core_name, sizeof(core_name), "/var/tmp/spdk_cpu_lock_%03d", core);
762 /* Return number of core we failed to claim. */
774 SPDK_ERRLOG("Could not mmap core %s (%s).\n", core_name, spdk_strerror(errno));
781 SPDK_ERRLOG("Cannot create lock on core %" PRIu32 ", probably process %d has claimed it.\n",
782 core, pid);
788 /* We write the PID to the core lock file so that other processes trying
789 * to claim the same core will know what process is holding the lock. */
792 g_core_locks[core] = core_fd;
800 /* Set number of core we failed to claim. */
801 *failed_core = core;
817 uint32_t i, core;
899 /* Calculate mempool size now that the env layer has configured the core count
912 SPDK_ERRLOG("Unable to acquire lock on assigned core mask - exiting.\n");
916 SPDK_NOTICELOG("CPU core locks deactivated.\n");
949 SPDK_ENV_FOREACH_CORE(core) {
950 rc = init_proc_stat(core);
952 SPDK_NOTICELOG("Unable to parse /proc/stat [core: %d].\n", core);
1093 printf(" -m, --cpumask <mask or list> core mask (like 0xF) or core list of '[]' embraced for DPDK\n");
1102 printf(" --disable-cpumask-locks Disable CPU core lock files.\n");
1105 printf(" -p, --main-core <id> main (primary) core for DPDK\n");
1141 printf(" --num-trace-entries <num> number of trace entries for each core, must be power of 2,\n");
1265 SPDK_ERRLOG("lcore map and core mask can't be set simultaneously\n");
1272 SPDK_ERRLOG("lcore map and core mask can't be set simultaneously\n");
1290 SPDK_ERRLOG("Invalid main core %s\n", optarg);
1589 snprintf(msg, sizeof(msg), "Failed to unclaim CPU core: %" PRIu32, failed_core);
1616 snprintf(msg, sizeof(msg), "Failed to claim CPU core: %" PRIu32, failed_core);