From: "WeitaoWang-oc@zhaoxin.com" <WeitaoWang-oc@zhaoxin.com>
To: Oliver Neukum <oneukum@suse.com>, <stern@rowland.harvard.edu>,
<gregkh@linuxfoundation.org>, <kishon@ti.com>,
<dianders@chromium.org>, <s.shtylyov@omp.ru>, <mka@chromium.org>,
<ming.lei@canonical.com>, <linux-usb@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Cc: <tonywwang@zhaoxin.com>, <weitaowang@zhaoxin.com>,
<CobeChen@zhaoxin.com>, <TimGuo@zhaoxin.com>
Subject: Re: [PATCH] USB: HCD: Fix URB giveback issue in tasklet function
Date: Thu, 21 Jul 2022 16:52:11 +0800 [thread overview]
Message-ID: <154b2167-47f1-4d1e-0cd7-afab25033b76@zhaoxin.com> (raw)
In-Reply-To: <09fed539-909a-f274-1a73-428dc7439d69@suse.com>
On 2022/7/21 16:00, Oliver Neukum wrote:
>
>
> On 21.07.22 08:08, Weitao Wang wrote:
>> Usb core introduce the mechanism of giveback of URB in tasklet context to
>> reduce hardware interrupt handling time. On some test situation(such as
>> FIO with 4KB block size), when tasklet callback function called to
>> giveback URB, interrupt handler add URB node to the bh->head list also.
>> If check bh->head list again after finish all URB giveback of local_list,
>> then it may introduce a "dynamic balance" between giveback URB and add URB
>> to bh->head list. This tasklet callback function may not exit for a long
>> time, which will cause other tasklet function calls to be delayed. Some
>> real-time applications(such as KB and Mouse) will see noticeable lag.
>>
>
> Hi,
>
> ow do you know usb_hcd_giveback_urb() will be called in time to process
> isoc URBs in time, if you leave them on the list? In fact how do
> you be sure it will be called at all? I can see no upper time limit
> on that.
>
> Regards
> Oliver
>
> .
If the bh->head list is not empty, patch method will raise a softirq
immediately to call work function of every tasklet. Therefore, I think
the left URB in bh->head list will be get giveback in time.
Thanks
weitao
next prev parent reply other threads:[~2022-07-21 8:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-21 6:08 Weitao Wang
2022-07-21 8:00 ` Oliver Neukum
2022-07-21 8:52 ` WeitaoWang-oc [this message]
2022-07-21 10:00 ` kernel test robot
2022-07-21 13:50 ` Alan Stern
2022-07-22 2:31 ` WeitaoWang-oc
2022-07-21 15:55 ` kernel test robot
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=154b2167-47f1-4d1e-0cd7-afab25033b76@zhaoxin.com \
--to=weitaowang-oc@zhaoxin.com \
--cc=CobeChen@zhaoxin.com \
--cc=TimGuo@zhaoxin.com \
--cc=dianders@chromium.org \
--cc=gregkh@linuxfoundation.org \
--cc=kishon@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=ming.lei@canonical.com \
--cc=mka@chromium.org \
--cc=oneukum@suse.com \
--cc=s.shtylyov@omp.ru \
--cc=stern@rowland.harvard.edu \
--cc=tonywwang@zhaoxin.com \
--cc=weitaowang@zhaoxin.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
all inboxes | Powered by JetHome®