From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796517135; b=VYLfIkCwa32faCDdKzwXJkulOZrW/Vfw569eR9wNCo1G5sAXt6FTNqfwjls6fZtUeGpc dBu/GXhVTH9vevA+jv6j4JwJ3n6iPPCikTwNbx3z4UTJm2Jz00vhXAUPSQPOKw6NECP8V ksDhR6sPkPZLc2vls2PQ8EMi2eT93UAREIHcBtEVaceWwjJADpfI+GUuuQND9GjhzK7nw 4OeW7wBZpZF8OZdETvDVq7d0lKqrkKfLsbEuPNghJfdueNYfVQoqhLHor6HjgmFzamkpX xu3C+11gLpo4kexeIC58er0p4SgW77UuVzwYRVSz+pe0jqs11LCs/nrDWC9eGJ6qXxQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796517135; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=bPgjNyAjapUBvpCT+oM8jNpB6EdC943mDtl6W1iEQUM=; b=ci+sKFpozLB9JnJ2dAaLjYV7qNw7Mffkq+xEfszNJLR+gM8/DanRs2sZd6QWGB8u0Ufj mRZXnBNWjIpAlxG6UM5j3ETMvvr7GIUu3uvHUOV+jBR5HlXCgIoqo0dH84b0Rq2jSjz/T CendIqL6CJSYErn9Sp6+qbYArOTVvzAU9ksIAaSy8TchWxlzgAROD+ukroMl1HVISZnum ojLewR6eibosfVo8tAwdcNKg8e+BHAWFQ3gzWHXVm8L4m9Wpgk4uvyTOEI78AAvUD8BCp 3Z58CrumGvHwVaBiKUnhuir0FYhM06854patknz7MQLz7c0nh/NTjiV2h4pWYi9PxFg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Us2ptF9C; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C85B5606A31F for ; Sun, 6 Dec 2026 00:32:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Us2ptF9C Received: by smtp.kernel.org (Postfix) with ESMTPSA id 529431F0093B; Sun, 6 Dec 2026 00:32:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796517135; bh=bPgjNyAjapUBvpCT+oM8jNpB6EdC943mDtl6W1iEQUM=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=Us2ptF9CRLZv6KJAfRFzJ3+rxpGEPMLnJwbJ4F8SrILqNz2w3tI2Tbn4l2WBCvkpg 9JzcJBTXMrlFqSUvtM+f1+ANYTJEHrkEeGTXFz0l0YSEeyp97CqL2GSIMkjmDCJYUu IwFOxr/5x0+ndllTGjNS5dmYlb3PMcklkUy8xKIGzum2tjHQWtHW2e/KKntyrrvLQo kEET81QJUQZsQEVlmdvJbdG6cnISADOsHs3P10k9Tr9tjOUgNbK9DIRcJc7iVFHMFw oSIeJiuObiyfPRefJlvy+2VpxNA4f5Rhb4ySpLg2LcxD3/Zofj4orgJEQwrCs0bZtR vOS0kbXBXC0LQ== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH 2/2] USB: serial: ch341: use more read urbs Reply-To: sashiko-reviews@lists.linux.dev To: "Mateusz Sikora" Cc: linux-usb@vger.kernel.org In-Reply-To: <20261206001844.14858-3-ms1qaz@gmail.com> References: <20261206001844.14858-1-ms1qaz@gmail.com> <20261206001844.14858-3-ms1qaz@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Sun, 06 Dec 2026 00:32:14 +0000 X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Medium] USB: serial: ch341: 32 read URBs serialize HCD unlinks on close and suspend -- commit 013e0416b1d1c563b2c9b985e82a5ab90d4fa11e Author: Mateusz Sikora USB: serial: ch341: use more read urbs This commit increases the number of bulk-in read URBs used by the ch341 driver from the default of 2 to 32. > diff --git a/drivers/usb/serial/ch341.c b/drivers/usb/serial/ch341.c > index 569f4aede215d..c9ac114b82e36 100644 > --- a/drivers/usb/serial/ch341.c > +++ b/drivers/usb/serial/ch341.c > @@ -868,6 +868,7 @@ static struct usb_serial_driver ch341_device =3D { > }, > .id_table =3D id_table, > .num_ports =3D 1, > + .num_read_urbs =3D 32, > .open =3D ch341_open, > .dtr_rts =3D ch341_dtr_rts, > .carrier_raised =3D ch341_carrier_raised, [Severity: Medium] Does queuing 32 read URBs introduce a close and suspend latency regression? On ch341_close(), usb_serial_generic_close() loops over port->read_urbs[] in forward order calling usb_kill_urb(), and usb_serial_port_poison_urbs() does the same with usb_poison_urb() on suspend. Each call unlinks one URB and sleeps until it completes, leaving the rest active on the endpoint. On EHCI, each active bulk QH unlink waits on a 2 ms timer and relinks the QH while other URBs remain queued, stalling close or suspend for at least 64 ms per open port (up from ~4 ms). OHCI and UHCI stall for 32-64 ms, and xHCI runs 32 Stop Endpoint and Set TR Dequeue Pointer cycles. Blocking all read URBs with usb_block_urb(), issuing asynchronous usb_unlink_urb() across them, and then waiting for completion in usb-serial core would let the HCD unlink the queue in a single cycle. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261206001844.1485= 8-1-ms1qaz@gmail.com?part=3D2