mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "WeitaoWang-oc@zhaoxin.com" <WeitaoWang-oc@zhaoxin.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: <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>, <tonywwang@zhaoxin.com>,
	<weitaowang@zhaoxin.com>, <CobeChen@zhaoxin.com>
Subject: Re: [PATCH v2] USB: HCD: Fix URB giveback issue in tasklet function
Date: Tue, 26 Jul 2022 14:46:57 +0800	[thread overview]
Message-ID: <3f2c941b-94cd-8357-13de-8656486e8cbd@zhaoxin.com> (raw)
In-Reply-To: <Yt6haeQBseJOEx1r@rowland.harvard.edu>

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
> .

      reply	other threads:[~2022-07-26  6:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-25  6:52 Weitao Wang
2022-07-25  8:29 ` Sergei Shtylyov
2022-07-25  8:52   ` WeitaoWang-oc
2022-07-25 13:58 ` Alan Stern
2022-07-26  6:46   ` WeitaoWang-oc [this message]

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=3f2c941b-94cd-8357-13de-8656486e8cbd@zhaoxin.com \
    --to=weitaowang-oc@zhaoxin.com \
    --cc=CobeChen@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=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®