linux/drivers/nvme/target
Chaitanya Kulkarni dab3902b19 nvmet: use inline bio for passthru fast path
In nvmet_passthru_execute_cmd() which is a high frequency function
it uses bio_alloc() which leads to memory allocation from the fs pool
for each I/O.

For NVMeoF nvmet_req we already have inline_bvec allocated as a part of
request allocation that can be used with preallocated bio when we
already know the size of request before bio allocation with bio_alloc(),
which we already do.

Introduce a bio member for the nvmet_req passthru anon union. In the
fast path, check if we can get away with inline bvec and bio from
nvmet_req with bio_init() call before actually allocating from the
bio_alloc().

This will be useful to avoid any new memory allocation under high
memory pressure situation and get rid of any extra work of
allocation (bio_alloc()) vs initialization (bio_init()) when
transfer len is < NVMET_MAX_INLINE_DATA_LEN that user can configure at
compile time.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2020-12-01 20:36:36 +01:00
..
admin-cmd.c nvmet: handle keep-alive timer when kato is modified by a set features cmd 2020-09-27 09:14:19 +02:00
configfs.c nvmet: add passthru io timeout value attr 2020-12-01 20:36:35 +01:00
core.c nvmet: fix a NULL pointer dereference when tracing the flush command 2020-10-27 10:02:50 +01:00
discovery.c nvmet: introduce flags member in nvmet_fabrics_ops 2020-07-08 16:16:17 +02:00
fabrics-cmd.c nvmet: add metadata/T10-PI support 2020-05-27 07:12:40 +02:00
fc.c nvmet-fc: fix missing check for no hostport struct 2020-09-27 09:14:19 +02:00
fcloop.c nvme-fcloop: add sysfs attribute to inject command drop 2020-12-01 20:36:34 +01:00
io-cmd-bdev.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
io-cmd-file.c nvmet: rename nvmet_check_data_len to nvmet_check_transfer_len 2020-05-27 07:12:39 +02:00
Kconfig nvmet: introduce the passthru Kconfig option 2020-07-29 07:45:21 +02:00
loop.c nvme: use consistent macro name for timeout 2020-12-01 20:36:35 +01:00
Makefile nvmet: add passthru code to process commands 2020-07-29 07:45:21 +02:00
nvmet.h nvmet: use inline bio for passthru fast path 2020-12-01 20:36:36 +01:00
passthru.c nvmet: use inline bio for passthru fast path 2020-12-01 20:36:36 +01:00
rdma.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
tcp.c nvmet-tcp: have queue io_work context run on sock incoming cpu 2020-09-27 09:14:18 +02:00
trace.c nvmet: trace: parse Get LBA Status command in detail 2019-08-29 12:55:01 -07:00
trace.h nvmet: fix a NULL pointer dereference when tracing the flush command 2020-10-27 10:02:50 +01:00