From: Bart Van Assche <bvanassche@acm.org>
To: "Hannes Reinecke" <hare@suse.de>,
"Peter Wang (王信友)" <peter.wang@mediatek.com>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"martin.petersen@oracle.com" <martin.petersen@oracle.com>
Subject: Re: [PATCH] UFS: Make TM command timeout configurable from host side
Date: Mon, 17 Nov 2025 08:40:59 -0800 [thread overview]
Message-ID: <c1f69239-b289-455f-b1b4-89fd3a6ddcee@acm.org> (raw)
In-Reply-To: <b83804a8419f0e8cc1a6263144fbaf1583bab2ed.camel@mediatek.com>
On 11/13/25 2:08 AM, Peter Wang (王信友) wrote:
> In the worst-case scenario (when the device is stuck), it
> may takes 1.1 seconds to abort a single task. When the queue is
> full (64), there will be noticeable lag. Aborting all
> tasks can take over a minute, which is unacceptable regardless
> of whether TM_CMD_TIMEOUT is increased or not. Under normal
> conditions, it’s very unlikely to exceed 100ms. So I think
> directly modifying TM_CMD_TIMEOUT is also acceptable,
> but I suggest keeping it within 500ms.
Hi Peter,
Aborting different commands should happen concurrently rather than
sequentially. See also the queue_delayed_work() call in the SCSI core
scsi_abort_command() function:
queue_delayed_work(shost->tmf_work_q, &scmd->abort_work, HZ / 100);
Unfortunately the max_active argument is set to 1 in the call that
creates tmf_work_q:
shost->tmf_work_q = alloc_workqueue("scsi_tmf_%d",
WQ_UNBOUND | WQ_MEM_RECLAIM | WQ_SYSFS,
1, shost->host_no);
Hannes, do you agree with increasing the max_active argument from 1 to
INT_MAX? I think the above code was introduced 12 years ago by commit
e494f6a72839 ("[SCSI] improved eh timeout handler").
Thanks,
Bart.
next prev parent reply other threads:[~2025-11-17 16:41 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20251106012702epcas1p28fdeed020ea44f18dcc751c283fbbcc2@epcas1p2.samsung.com>
2025-11-06 1:26 ` [PATCH] UFS: Make TM command timeout configurable from host side Seunghui Lee
2025-11-11 2:46 ` Peter Wang (王信友)
2025-11-11 8:44 ` Seunghui Lee
2025-11-11 9:03 ` Peter Wang (王信友)
2025-11-11 16:37 ` Bart Van Assche
2025-11-12 2:58 ` Peter Wang (王信友)
2025-11-12 8:49 ` Seunghui Lee
2025-11-12 9:42 ` Peter Wang (王信友)
2025-11-12 16:51 ` Bart Van Assche
2025-11-13 10:08 ` Peter Wang (王信友)
2025-11-17 7:11 ` Seunghui Lee
2025-11-17 8:40 ` Peter Wang (王信友)
2025-11-17 9:48 ` Seunghui Lee
2025-11-18 5:48 ` Peter Wang (王信友)
2025-11-17 16:43 ` Bart Van Assche
2025-11-18 5:55 ` Peter Wang (王信友)
2025-11-18 17:31 ` Bart Van Assche
2025-11-19 9:20 ` Peter Wang (王信友)
2025-11-17 16:40 ` Bart Van Assche [this message]
2025-11-18 5:52 ` Peter Wang (王信友)
2025-11-11 16:38 ` Bart Van Assche
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=c1f69239-b289-455f-b1b4-89fd3a6ddcee@acm.org \
--to=bvanassche@acm.org \
--cc=hare@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=peter.wang@mediatek.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.