Skip to content
Commit ac3dd5bd authored by Jens Axboe's avatar Jens Axboe
Browse files

NVMe: avoid kmalloc/kfree for smaller IO



Currently we allocate an nvme_iod for each IO, which holds the
sg list, prps, and other IO related info. Set a threshold of
2 pages and/or 8KB of data, below which we can just embed this
in the per-command pdu in blk-mq. For any IO at or below
NVME_INT_PAGES and NVME_INT_BYTES, we save a kmalloc and kfree.

For higher IOPS, this saves up to 1% of CPU time.

Signed-off-by: default avatarJens Axboe <axboe@fb.com>
Reviewed-by: default avatarKeith Busch <keith.busch@intel.com>
parent 4ca5829a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment