linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Keith Busch <keith.busch@intel.com>
Cc: "linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
	Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH v2] nvme: provide fallback for discard alloc failure
Date: Wed, 12 Dec 2018 09:36:36 -0700	[thread overview]
Message-ID: <f53d0bc1-6fe0-12e5-c210-e583d71bc739@kernel.dk> (raw)
In-Reply-To: <20181212162855.GA10895@localhost.localdomain>

On 12/12/18 9:28 AM, Keith Busch wrote:
> On Wed, Dec 12, 2018 at 09:18:11AM -0700, Jens Axboe wrote:
>> When boxes are run near (or to) OOM, we have a problem with the discard
>> page allocation in nvme. If we fail allocating the special page, we
>> return busy, and it'll get retried. But since ordering is honored for
>> dispatch requests, we can keep retrying this same IO and failing. Behind
>> that IO could be requests that want to free memory, but they never get
>> the chance.
>>
>> Allocate a fixed discard page per controller for a safe fallback, and use
>> that if the initial allocation fails.
> 
> Do we need to allocate this per controller? One page for the whole driver
> may be sufficient to make forward progress, right?

It should be, but that might create a shit storm if we're OOM and have
tons of drives. I think one per controller is saner, and it's dwarfed
by memory we consume anyway in static allocations.

-- 
Jens Axboe


  reply	other threads:[~2018-12-12 16:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-12 16:18 [PATCH v2] nvme: provide fallback for discard alloc failure Jens Axboe
2018-12-12 16:28 ` Keith Busch
2018-12-12 16:36   ` Jens Axboe [this message]
2018-12-12 16:50     ` Keith Busch
2018-12-13  3:00 ` Sagi Grimberg
2018-12-13  8:36 ` Christoph Hellwig

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=f53d0bc1-6fe0-12e5-c210-e583d71bc739@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=keith.busch@intel.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).