All of lore.kernel.org
 help / color / mirror / Atom feed
From: keith.busch@linux.intel.com (Keith Busch)
Subject: [PATCH] nvme: use __GFP_NOWARN for iod allocation
Date: Wed, 20 Jun 2018 14:43:10 -0600	[thread overview]
Message-ID: <20180620204310.GA24840@localhost.localdomain> (raw)
In-Reply-To: <b51cce4d-d0c9-fb4e-d5ac-2e48e23e18f7@kernel.dk>

On Wed, Jun 20, 2018@02:09:03PM -0600, Jens Axboe wrote:
> On 6/20/18 1:16 PM, Jens Axboe wrote:
> > On 6/20/18 1:10 PM, Jens Axboe wrote:
> >> This begs the question is we should limit the size in general. The
> >> command overhead is low enough that I think we should default to
> >> something sane that doesn't require _any_ > 0 order allocations.
> >>
> >> Our default 1280kb will require 10248 bytes of iod, which is an
> >> order 2 allocation.... That's not helping tail latencies in
> >> data centers, where memory is always full and fragmented.
> > 
> > In terms of sizing, defaulting to 256kb might not be a bad idea.
> > That'd be 2056 bytes for a normal config. Alternatively we could
> > go 1280/4 == 320k, which would be 2568 bytes.
> > 
> > In any case, I think it's something that's worth doing.
> 
> Talking more to myself - higher order allocations needed to make
> progress isn't a viable approach. There may _never_ be any available,
> which means we are stuck since this isn't backed by a mempool.
> 
> How about something like the below. Default to a size that will
> never require > PAGE_SIZE allocation, and back that with a single
> entry mempool. Even if we don't wait on it, if we keep retrying
> we'll always be able to allocate memory and make forward progress.
> And allocating a single page is a hell of a lot more likely than
> a 2nd order allocation.

If we go this route, there is a great deal of cleanup that can follow
on. For example, we'll never need to chain PRPs, so nvme_iod setup/free
can become a lot simpler, and the struct iod npages and hidden "iod_list"
member can go away.

  reply	other threads:[~2018-06-20 20:43 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-20 19:10 [PATCH] nvme: use __GFP_NOWARN for iod allocation Jens Axboe
2018-06-20 19:16 ` Jens Axboe
2018-06-20 20:09   ` Jens Axboe
2018-06-20 20:43     ` Keith Busch [this message]
2018-06-20 20:54       ` Jens Axboe
2018-06-20 22:30         ` Keith Busch
2018-06-20 22:30           ` Jens Axboe
2018-06-21  7:10             ` Christoph Hellwig
2018-06-21 14:47               ` Jens Axboe
2018-06-21 15:01                 ` Christoph Hellwig
2018-06-21 15:04                   ` Jens Axboe
2018-06-21 15:06                     ` Jens Axboe
2018-06-21 15:24                       ` Christoph Hellwig
2018-06-21 15:26                         ` Jens Axboe
2018-06-21 15:24                     ` Christoph Hellwig
2018-06-21 15:34                       ` Jens Axboe
2018-06-21 15:45                         ` Christoph Hellwig
2018-06-21 15:49                           ` Jens Axboe
2018-06-21 16:27                             ` Keith Busch
2018-06-21 17:20                               ` Jens Axboe
2018-06-21 17:54                                 ` Christoph Hellwig
2018-06-21 19:18                                   ` Jens Axboe
2018-06-20 20:51     ` Jens Axboe
2018-06-21  7:15       ` Christoph Hellwig
2018-06-21 14:37         ` Jens Axboe
2018-06-21 14:56           ` Christoph Hellwig
2018-06-21 15:01             ` Jens Axboe
2018-06-21  7:09     ` Christoph Hellwig
2018-06-21 14:39       ` Jens Axboe
2018-06-21 14:58         ` Christoph Hellwig
2018-06-21 15:02           ` Jens Axboe
2018-06-21 15:06             ` Christoph Hellwig
2018-06-21 15:11               ` Jens Axboe

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=20180620204310.GA24840@localhost.localdomain \
    --to=keith.busch@linux.intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.