Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nvme: use __GFP_NOWARN for iod allocation
@ 2018-06-20 19:10 Jens Axboe
  2018-06-20 19:16 ` Jens Axboe
  0 siblings, 1 reply; 33+ messages in thread
From: Jens Axboe @ 2018-06-20 19:10 UTC (permalink / raw)


The iod can get quite large, requiring higher order allocations that
we know can fail. Don't warn about them, as that just tends to flod
the log with information we don't care about.

Signed-off-by: Jens Axboe <axboe at kernel.dk>

---

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.

diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index fc33804662e7..1c97d6356484 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -480,7 +480,7 @@ static blk_status_t nvme_init_iod(struct request *rq, struct nvme_dev *dev)
 		size_t alloc_size = nvme_pci_iod_alloc_size(dev, size, nseg,
 				iod->use_sgl);
 
-		iod->sg = kmalloc(alloc_size, GFP_ATOMIC);
+		iod->sg = kmalloc(alloc_size, GFP_ATOMIC | __GFP_NOWARN);
 		if (!iod->sg)
 			return BLK_STS_RESOURCE;
 	} else {

-- 
Jens Axboe

^ permalink raw reply related	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2018-06-21 19:18 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox