nvmf/tcp: Allocate pdu pool out of hugepages
It is faster for the kernel to pin memory in hugepages, so allocate the pdu pool from hugepages. This will help more with upcoming changes to leverage MSG_ZEROCOPY. Change-Id: I9ce581acca9c6edb71bd8119258966e3b405db77 Signed-off-by: Ben Walker <benjamin.walker@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475801 Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Or Gerlitz <gerlitz.or@gmail.com>
This commit is contained in:
parent
053fa66b10
commit
d31eb732af
@ -482,7 +482,7 @@ spdk_nvmf_tcp_qpair_destroy(struct spdk_nvmf_tcp_qpair *tqpair)
|
||||
if (err > 0) {
|
||||
nvmf_tcp_dump_qpair_req_contents(tqpair);
|
||||
}
|
||||
free(tqpair->pdu);
|
||||
spdk_dma_free(tqpair->pdu);
|
||||
free(tqpair->pdu_pool);
|
||||
free(tqpair->req);
|
||||
free(tqpair->reqs);
|
||||
@ -903,7 +903,8 @@ spdk_nvmf_tcp_qpair_init_mem_resource(struct spdk_nvmf_tcp_qpair *tqpair, uint16
|
||||
tcp_req->state = TCP_REQUEST_STATE_FREE;
|
||||
TAILQ_INSERT_TAIL(&tqpair->state_queue[tcp_req->state], tcp_req, state_link);
|
||||
|
||||
tqpair->pdu = calloc(NVMF_TCP_QPAIR_MAX_C2H_PDU_NUM + 1, sizeof(*tqpair->pdu));
|
||||
tqpair->pdu = spdk_dma_malloc((NVMF_TCP_QPAIR_MAX_C2H_PDU_NUM + 1) * sizeof(*tqpair->pdu), 0x1000,
|
||||
NULL);
|
||||
if (!tqpair->pdu) {
|
||||
SPDK_ERRLOG("Unable to allocate pdu on tqpair=%p.\n", tqpair);
|
||||
return -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user