[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <3f2c941b-94cd-8357-13de-8656486e8cbd@zhaoxin.com>
Date: Tue, 26 Jul 2022 14:46:57 +0800
From: "WeitaoWang-oc@...oxin.com" <WeitaoWang-oc@...oxin.com>
To: Alan Stern <stern@...land.harvard.edu>
CC: <gregkh@...uxfoundation.org>, <kishon@...com>,
<dianders@...omium.org>, <s.shtylyov@....ru>, <mka@...omium.org>,
<ming.lei@...onical.com>, <linux-usb@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <tonywwang@...oxin.com>,
<weitaowang@...oxin.com>, <CobeChen@...oxin.com>
Subject: Re: [PATCH v2] USB: HCD: Fix URB giveback issue in tasklet function
On 2022/7/25 21:58, Alan Stern wrote:
> On Mon, Jul 25, 2022 at 02:52:51PM +0800, Weitao Wang wrote:
>
> This is basically okay. Just a couple of small comments...
>
>> 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.
>>
>> Fix this issue by taking new URBs giveback in next tasklet function call.
>> Add a member high_prio for structure giveback_urb_bh and replace the local
>> high_prio_bh variable with this structure member in usb_hcd_giveback_urb.
>
> The patch description should do more than say what the new code _is_ --
> we can see that easily enough by reading the patch. The description
> should explain _why_ the code was changed.
>
Okay, I will improve this patch description.
>> - /* check if there are new URBs to giveback */
>> + /* giveback new URBs next time to prevent this function from
>> + * not exiting for a long time.
>> + */
>
> Minor stylistic issue: The currently accepted format for multi-line
> comments is like this:
>
This notes will be improved in next patch version also.
Thanks for your suggestion.
weitao
> /*
> * Blah blah blah
> * Blah blah blah
> */
>
> Alan Stern
> .
Powered by blists - more mailing lists