All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Minas Harutyunyan
	<Minas.Harutyunyan-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>,
	Mirza Krak <mirza.krak-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: gregkh <gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
	"linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
	<linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
	linux-usb <linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"John.Youn-HKixBCOQz3hWk0Htik3J/w@public.gmane.org"
	<John.Youn-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>
Subject: Re: High CPU load produced by USB (DW2)
Date: Mon, 19 Feb 2018 09:51:44 +0100	[thread overview]
Message-ID: <be95c74c-5706-df34-b83a-45c9df149f5e@gmail.com> (raw)
In-Reply-To: <410670D7E743164D87FA6160E7907A560113A6E9E6-ouFQeoKRuQ8bQ7k9MBbv4fufCSb+aD3WLzEdoUbNIic@public.gmane.org>

On 02/19/2018 09:19 AM, Minas Harutyunyan wrote:
> On 2/17/2018 12:07 AM, Marek Vasut wrote:
>> On 02/16/2018 06:59 AM, Minas Harutyunyan wrote:
>>> On 2/15/2018 5:20 PM, Mirza Krak wrote:
>>>> On 14 February 2018 at 13:07, Minas Harutyunyan
>>>> <Minas.Harutyunyan-HKixBCOQz3hWk0Htik3J/w@public.gmane.org> wrote:
>>>>> On 2/14/2018 12:57 PM, Mirza Krak wrote:
>>>>>> On 8 February 2018 at 14:53, Minas Harutyunyan
>>>>>> <Minas.Harutyunyan-HKixBCOQz3hWk0Htik3J/w@public.gmane.org> wrote:
>>>>
>>>> < snip >
>>>>
>>>>>
>>>>> I reviewed your interrupt count log again. About 140,000 interrupts in 2
>>>>> seconds, obviously it's not SOF only interrupts. More probably, its NAK
>>>>> respond interrupts to SSPLIT/CSPLIT transactions. For this case I can
>>>>> recommend you to apply patch from Douglas Anderson: "[PATCH v2] usb:
>>>>> dwc2: host: Don't retry NAKed transactions right away" which already
>>>>> merged to 4.16-rc1.
>>>>>
>>>>> In your setups you see different behavior on different HUBs. Your HUBs
>>>>> have different "TT think time": 8 and 32. In USB2.0 spec "TT think time"
>>>>> described as follow "TT requires at most 8/32 FS bit times of inter
>>>>> transaction gap on a full-/low-speed downstream bus". So, your "worst"
>>>>> HUB with "TT think time"=8 sending more frequently SSPLIT/CSPLIT
>>>>> transactions which replied by NAK. As result you see about 4 time more
>>>>> interrupts comparing to "good" HUB. Could you please check interrupts
>>>>> count for "good" HUB and check "4 time" hypothesis.
>>>>
>>>> Did some further testing. The "good" HUB is actually as bad as the
>>>> "bad" HUB, and it was my setup that caused the different behavior. Did
>>>> not use the same devices etc.
>>>>
>>>> Once I made sure that the configuration and setup was the same on both
>>>> board I could see that the behaved similarly. And that is the
>>>> following interrupt load:
>>>>
>>>> - BT USB (FS) = ~80k interrupts / second
>>>> - Keyboard (FS) = ~80k interrupts / second
>>>> - WiFI USB (HS) = ~8k interrupts / second
>>>>
>>>> After applying the suggested patch [1], it is steady around 8k
>>>> interrupts / second no matter what device I connect (HS/FS,
>>>> HUB/NO-HUB). Which is acceptable and usable.
>>>
>>> Great!
>>
>> So 8k IRQs per second is what I should expect from this HW with HS
>> device attached, that's normal and cannot be reduced ?
>>
> If core acting as Host in Buffer DMA mode then 8k IRQs per second (SOF 
> interrupts) is expected if connected device(s) has periodic endpoint.

Is there a way to reduce that or is that the absolute minimum in HS mode?

-- 
Best regards,
Marek Vasut

  parent reply	other threads:[~2018-02-19  8:51 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-07  9:48 High CPU load produced by USB (DW2) Mirza Krak
     [not found] ` <CALw8SCXuOCpndakFBRbP7FpJKOSH+nzNStkszWD4XTXVSK1zyQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-02-07 14:27   ` gregkh
2018-02-08  8:50     ` Minas Harutyunyan
2018-02-08 11:02 ` Minas Harutyunyan
     [not found]   ` <410670D7E743164D87FA6160E7907A560113A67F86-ouFQeoKRuQ8bQ7k9MBbv4fufCSb+aD3WLzEdoUbNIic@public.gmane.org>
2018-02-08 13:06     ` Mirza Krak
2018-02-08 13:53       ` Minas Harutyunyan
     [not found]         ` <410670D7E743164D87FA6160E7907A560113A68287-ouFQeoKRuQ8bQ7k9MBbv4fufCSb+aD3WLzEdoUbNIic@public.gmane.org>
2018-02-14  8:57           ` Mirza Krak
2018-02-14 12:07             ` Minas Harutyunyan
     [not found]               ` <410670D7E743164D87FA6160E7907A560113A6B365-ouFQeoKRuQ8bQ7k9MBbv4fufCSb+aD3WLzEdoUbNIic@public.gmane.org>
2018-02-15 13:20                 ` Mirza Krak
2018-02-16  5:59                   ` Minas Harutyunyan
     [not found]                     ` <410670D7E743164D87FA6160E7907A560113A6C4CA-ouFQeoKRuQ8bQ7k9MBbv4fufCSb+aD3WLzEdoUbNIic@public.gmane.org>
2018-02-16 20:07                       ` Marek Vasut
2018-02-19  8:19                         ` Minas Harutyunyan
     [not found]                           ` <410670D7E743164D87FA6160E7907A560113A6E9E6-ouFQeoKRuQ8bQ7k9MBbv4fufCSb+aD3WLzEdoUbNIic@public.gmane.org>
2018-02-19  8:51                             ` Marek Vasut [this message]
2018-02-19 10:11                               ` Minas Harutyunyan
     [not found]                                 ` <410670D7E743164D87FA6160E7907A560113A6EB2B-ouFQeoKRuQ8bQ7k9MBbv4fufCSb+aD3WLzEdoUbNIic@public.gmane.org>
2018-02-19 17:02                                   ` Marek Vasut
2018-02-20  5:51                                     ` Minas Harutyunyan
     [not found]                                       ` <410670D7E743164D87FA6160E7907A560113A6F1B4-ouFQeoKRuQ8bQ7k9MBbv4fufCSb+aD3WLzEdoUbNIic@public.gmane.org>
2018-03-05 17:37                                         ` Marek Vasut
2018-03-06  6:45                                           ` Minas Harutyunyan
2018-03-06  8:09                                             ` Minas Harutyunyan
     [not found]                                               ` <410670D7E743164D87FA6160E7907A560113AB3F3D-ouFQeoKRuQ8bQ7k9MBbv4fufCSb+aD3WLzEdoUbNIic@public.gmane.org>
2018-03-07 22:42                                                 ` Marek Vasut

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=be95c74c-5706-df34-b83a-45c9df149f5e@gmail.com \
    --to=marek.vasut-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=John.Youn-HKixBCOQz3hWk0Htik3J/w@public.gmane.org \
    --cc=Minas.Harutyunyan-HKixBCOQz3hWk0Htik3J/w@public.gmane.org \
    --cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
    --cc=linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mirza.krak-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.