From mboxrd@z Thu Jan 1 00:00:00 1970 From: axboe@fb.com (Jens Axboe) Date: Thu, 29 Jan 2015 09:24:21 -0800 Subject: [PATCH v2] NVMe: avoid kmalloc/kfree for smaller IO In-Reply-To: References: <20150122190758.GA28666@kernel.dk> Message-ID: <54CA6CC5.7090602@fb.com> On 01/29/2015 09:21 AM, Keith Busch wrote: > On Thu, 22 Jan 2015, Jens Axboe wrote: >> 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. > > Looks good to me, tests well on my machines. I had to make one minor > modification to the diff for it to apply to your latest tree, but it's > trivial and you'll see it (just below nvme_set_info()). > > Reviewed-by: Keith Busch Thanks! I'll apply it for 3.20/drivers. -- Jens Axboe