Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: axboe@fb.com (Jens Axboe)
Subject: [PATCH v2] NVMe: avoid kmalloc/kfree for smaller IO
Date: Thu, 29 Jan 2015 09:24:21 -0800	[thread overview]
Message-ID: <54CA6CC5.7090602@fb.com> (raw)
In-Reply-To: <alpine.LNX.2.00.1501291714300.15481@localhost.lm.intel.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 <keith.busch at intel.com>

Thanks! I'll apply it for 3.20/drivers.

-- 
Jens Axboe

      reply	other threads:[~2015-01-29 17:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-22 19:07 [PATCH v2] NVMe: avoid kmalloc/kfree for smaller IO Jens Axboe
2015-01-29 17:21 ` Keith Busch
2015-01-29 17:24   ` Jens Axboe [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54CA6CC5.7090602@fb.com \
    --to=axboe@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox