Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>,
	Xixin Liu <liuxixin@kylinos.cn>
Cc: axboe@kernel.dk, hch@lst.de, kbusch@kernel.org,
	linux-nvme@lists.infradead.org, sagi@grimberg.me
Subject: Re: blktests nvme/062 lockdep — defer TLS inline send to io_work?
Date: Tue, 18 Aug 2026 14:34:46 +0200	[thread overview]
Message-ID: <ee0225fa-6a0b-4933-9a4d-5c77792eb94b@suse.de> (raw)
In-Reply-To: <aoPuIUSQvZxujmv7@shinhome>

On 8/18/26 7:38 AM, Shin'ichiro Kawasaki wrote:
> On Jul 01, 2026 / 09:50, Xixin Liu wrote:
>> Hi Hannes,
>>
>> On Mon, 29 Jun 2026, Hannes Reinecke wrote:
>>> The most likely testcase showing regressions would be having as many
>>> jobs as your machine has CPUs and use qd=1.
>>> Just a single job will not be enough to show a noticeable difference.
>>
>> I re-ran the TLS perf comparison with one job per CPU and queue depth 1
>> on a new test host.  Please treat the results below as the authoritative
>> perf data for this workload.
>>
>> Test setup
>> ----------
>>    aarch64 server, 128 CPUs, linux-next 7.2.0-rc1-*-perf-dirty
>>
>>    Same-machine nvmet-tcp with TLS; target backing store is a 32G file on a
>>    local NVMe SSD.  fio runs against the connected nvme-tcp namespace.
>>
>>    Compared inline send_all (baseline) vs deferring TLS inline send (io_work).
>>    fio randwrite 4k, direct I/O, 30s per run, 15s warmup discarded before
>>    each mode (10 runs total):
>>
>>    - iodepth=1, numjobs=128:
>>        baseline 54539.4 IOPS, mean 2.34ms, p99 6.02ms
>>        patched  54529.0 IOPS, mean 2.34ms, p99 5.99ms
>>
>>    - iodepth=128, numjobs=8:
>>        baseline 54632.6 IOPS, mean 18.74ms, p99 47.08ms
>>        patched  54633.6 IOPS, mean 18.74ms, p99 46.92ms
>>
>> So on a 128-CPU box with the workload you called out, deferring TLS inline
>> send still looks neutral across 10 consecutive runs after warmup.
> 
> Xixin, thank you for the effort. The nvme/062 lockdep WARN still exists with
> v7.2 kernel. Per your suggestion, I applied the patch below [*] on top of v7.2
> kernel, and confirmed the nvme/062 goes away. This is great from blktests user
> point of view.
> 
> Hannes, Xixin provided the latency numbers above. Are they enough to show no
> impact of the fix patch? Or do you think more workload variations should be
> covered?
> 
> 
> [*] trial patch
> 
> diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c
> index ba5c7b3e2a7c..122d815270b9 100644
> --- a/drivers/nvme/host/tcp.c
> +++ b/drivers/nvme/host/tcp.c
> @@ -411,6 +411,7 @@ static inline void nvme_tcp_queue_request(struct nvme_tcp_request *req,
>   	 * are on the same cpu, so we don't introduce contention.
>   	 */
>   	if (queue->io_cpu == raw_smp_processor_id() &&
> +	    !nvme_tcp_queue_tls(queue) &&
>   	    empty && mutex_trylock(&queue->send_mutex)) {
>   		nvme_tcp_send_all(queue);
>   		mutex_unlock(&queue->send_mutex);

I actually thought we could do away with this 'if' condition completely.
But that I guess requires more analysis. So for now:

Reviewed-by: Hannes Reinecke <hare@kernel.org>

Can you send a formal patch?

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                  Kernel Storage Architect
hare@suse.de                                +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich


  reply	other threads:[~2026-08-18 12:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-24  5:04 blktests failures with v7.1 kernel Shin'ichiro Kawasaki
2026-06-26  1:19 ` blktests nvme/062 lockdep — defer TLS inline send to io_work? Xixin Liu
2026-06-26  6:40   ` Hannes Reinecke
2026-06-29  7:00     ` Xixin Liu
2026-07-01  1:50       ` Xixin Liu
2026-08-18  5:38         ` Shin'ichiro Kawasaki
2026-08-18 12:34           ` Hannes Reinecke [this message]
2026-08-19  0:50             ` [PATCH] nvme-tcp: defer TLS inline send to io_work Xixin Liu
2026-08-25  2:57               ` Keith Busch
2026-08-19  1:05             ` blktests nvme/062 lockdep, defer TLS inline send to io_work? Xixin Liu
2026-08-22 23:02             ` blktests nvme/062 lockdep — " Sagi Grimberg
2026-08-24  6:00               ` blktests nvme/062 lockdep, " Xixin Liu

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=ee0225fa-6a0b-4933-9a4d-5c77792eb94b@suse.de \
    --to=hare@suse.de \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=liuxixin@kylinos.cn \
    --cc=sagi@grimberg.me \
    --cc=shinichiro.kawasaki@wdc.com \
    /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