]> git.baikalelectronics.ru Git - kernel.git/commit
NVMe: Do not over allocate for discard requests
authorKeith Busch <keith.busch@intel.com>
Mon, 6 Oct 2014 21:23:06 +0000 (15:23 -0600)
committerJens Axboe <axboe@fb.com>
Tue, 4 Nov 2014 20:18:37 +0000 (13:18 -0700)
commit2233dff5bc6ae6d4b8726d9a4cdd59d669698cf4
tree49d5e8d5357dc0e77625f0632a91078e4ab67904
parentd6766244cba4c2084104b0f9ba4c92a9dff0fc02
NVMe: Do not over allocate for discard requests

Discard requests are often for very large ranges. The discard size is not
representative of the data transfer size so we don't need to allocate
for such a large prp list. This patch requests allocating only enough
for the memory needed for the data transfer and saves a little over 8k
of memory per max discard request.

Signed-off-by: Keith Busch <keith.busch@intel.com>
Reported-by: Paul Grabinar <paul.grabinar@ranbarg.com>
Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/block/nvme-core.c