public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
From: Jayant Chowdhary <jchowdhary@google.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: dan.scally@ideasonboard.com, stern@rowland.harvard.edu,
	laurent.pinchart@ideasonboard.com, m.grzeschik@pengutronix.de,
	Thinh.Nguyen@synopsys.com, arakesh@google.com,
	etalvala@google.com, linux-kernel@vger.kernel.org,
	linux-usb@vger.kernel.org
Subject: Re: [PATCH v5] usb:gadget:uvc Do not use worker thread to pump isoc usb requests
Date: Wed, 8 Nov 2023 23:38:14 -0800	[thread overview]
Message-ID: <6ee5bf0d-415e-4042-b857-ff041d666295@google.com> (raw)
In-Reply-To: <2023110953-tavern-underwent-63e7@gregkh>

On 11/8/23 21:29, Greg KH wrote:
> On Thu, Nov 09, 2023 at 02:12:50AM +0000, Jayant Chowdhary wrote:
>> When we use an async work queue to perform the function of pumping
>> usb requests to the usb controller, it is possible that amongst other
>> factors, thread scheduling affects at what cadence we're able to pump
>> requests. This could mean isoc usb requests miss their uframes - resulting
>> in video stream flickers on the host device.
>>
>> To avoid this, we make the async_wq thread only produce isoc usb_requests
>> with uvc buffers encoded into them. The process of queueing to the
>> endpoint is done by the uvc_video_complete() handler. In case no
>> usb_requests are ready with encoded information, we just queue a zero
>> length request to the endpoint from the complete handler.
>>
>> For bulk endpoints the async_wq thread still queues usb requests to the
>> endpoint.
>>
>> Change-Id: I8a33cbf83fb2f04376826185079f8b25404fe761
>> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
>> Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
>> Suggested-by: Avichal Rakesh <arakesh@google.com>
>> Suggested-by: Alan Stern <stern@rowland.harvard.edu>
>> ---
>>  Based on top of
>>  https://lore.kernel.org/linux-usb/20230930184821.310143-1-arakesh@google.com/T/#t:
>>  v1->v2: Added self Signed-Off-by and addressed review comments
>>  v2->v3: Encode to usb requests in async_wq; queue to ep in complete handler
>> 	 for isoc transfers.
>>  v3->v4: Address review comments around code style.
>>  v4->v5: Update comments. Remove 0 length request queueing from async_wq
>> 	 thread since it is already done by the complete handler.
> You forgot to run checkpatch.pl :(

My apologies, I sent out v6 with checkpatch.pl fixed.

Thanks


  reply	other threads:[~2023-11-09  7:38 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-25 22:59 [PATCH] usb:gadget:uvc Do not use worker thread to pump usb requests Jayant Chowdhary
2023-10-26  6:58 ` Michael Grzeschik
2023-10-26 21:56   ` [PATCH v2] " Jayant Chowdhary
2023-10-27  7:19     ` Greg KH
2023-10-27  7:51     ` Laurent Pinchart
2023-10-27 11:10       ` Michael Grzeschik
2023-10-27 11:47         ` Laurent Pinchart
2023-10-27 13:39           ` Michael Grzeschik
2023-10-27 14:58             ` Alan Stern
2023-10-28 11:10               ` Michael Grzeschik
2023-10-28 14:09                 ` Jayant Chowdhary
2023-10-31  6:11                   ` Jayant Chowdhary
2023-11-02  6:06                     ` Jayant Chowdhary
2023-10-27 10:44     ` Greg KH
2023-11-02  6:01     ` [PATCH v3] usb:gadget:uvc Do not use worker thread to queue isoc " Jayant Chowdhary
2023-11-02 16:07       ` Dan Scally
2023-11-03  7:13         ` [PATCH v4] usb:gadget:uvc Do not use worker thread to pump " Jayant Chowdhary
2023-11-09  2:12           ` [PATCH v5] " Jayant Chowdhary
2023-11-09  5:29             ` Greg KH
2023-11-09  7:38               ` Jayant Chowdhary [this message]
2023-11-09  7:34             ` [PATCH v6] " Jayant Chowdhary
2023-11-16 10:09               ` Dan Scally
2023-11-20  6:30                 ` Jayant Chowdhary
2023-11-20  6:20               ` [PATCH v7] " Jayant Chowdhary
2023-11-03  7:28         ` [PATCH v3] usb:gadget:uvc Do not use worker thread to queue " Jayant Chowdhary
2023-11-03 10:29           ` Michael Grzeschik
2023-11-06 17:51             ` Jayant Chowdhary
2023-11-07 17:01           ` Dan Scally
2023-11-09 16:46             ` Jayant Chowdhary
2023-11-14 18:52               ` Jayant Chowdhary
2023-11-16 10:10                 ` Dan Scally

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=6ee5bf0d-415e-4042-b857-ff041d666295@google.com \
    --to=jchowdhary@google.com \
    --cc=Thinh.Nguyen@synopsys.com \
    --cc=arakesh@google.com \
    --cc=dan.scally@ideasonboard.com \
    --cc=etalvala@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=m.grzeschik@pengutronix.de \
    --cc=stern@rowland.harvard.edu \
    /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