};
enum mempool_type {
- MEMPOOL_TYPE_PERCPU = 0, /* Default */
- MEMPOOL_TYPE_GLOBAL = 1,
+ MEMPOOL_TYPE_GLOBAL = 0, /* Default */
+ MEMPOOL_TYPE_PERCPU = 1,
};
struct rseq_mempool_attr {
}
break;
case MEMPOOL_TYPE_GLOBAL:
+ /* Use a 1-cpu pool for global mempool type. */
+ attr.max_nr_cpus = 1;
break;
}
if (!attr.stride)
}
attr->type = MEMPOOL_TYPE_GLOBAL;
attr->stride = stride;
- attr->max_nr_cpus = 1;
+ attr->max_nr_cpus = 0;
return 0;
}