lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 8 May 2017 13:54:58 +0200
From:   Javier González <jg@...htnvm.io>
To:     Jens Axboe <axboe@...com>, Christoph Hellwig <hch@....de>,
        Dan Williams <dan.j.williams@...el.com>
Cc:     linux-block@...r.kernel.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Large latency on blk_queue_enter

Hi,

I find an unusual added latency(~20-30ms) on blk_queue_enter when
allocating a request directly from the NVMe driver through
nvme_alloc_request. I could use some help confirming that this is a bug
and not an expected side effect due to something else.

I can reproduce this latency consistently on LightNVM when mixing I/O
from pblk and I/O sent through an ioctl using liblightnvm, but I don't
see anything on the LightNVM side that could impact the request
allocation.

When I have a 100% read workload sent from pblk, the max. latency is
constant throughout several runs at ~80us (which is normal for the media
we are using at bs=4k, qd=1). All pblk I/Os reach the nvme_nvm_submit_io
function on lightnvm.c., which uses nvme_alloc_request. When we send a
command from user space through an ioctl, then the max latency goes up
to ~20-30ms. This happens independently from the actual command
(IN/OUT). I tracked down the added latency down to the call
percpu_ref_tryget_live in blk_queue_enter. Seems that the queue
reference counter is not released as it should through blk_queue_exit in
blk_mq_alloc_request. For reference, all ioctl I/Os reach the
nvme_nvm_submit_user_cmd on lightnvm.c

Do you have any idea about why this might happen? I can dig more into
it, but first I wanted to make sure that I am not missing any obvious
assumption, which would explain the reference counter to be held for a
longer time.

Thanks!
Javier


Download attachment "signature.asc" of type "application/pgp-signature" (802 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ