public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Badhri Jagan Sridharan <badhri@google.com>
Cc: Thinh.Nguyen@synopsys.com, gregkh@linuxfoundation.org,
	felipe.balbi@linux.intel.com, robh@kernel.org,
	krzk+dt@kernel.org, conor+dt@kernel.org, johnyoun@synopsys.com,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org, jameswei@google.com,
	stable@kernel.org
Subject: Re: [PATCH v1 1/2] dt-bindings: usb: snps,dwc3: Add property for imod
Date: Wed, 5 Feb 2025 14:50:09 +0100	[thread overview]
Message-ID: <80172550-a3d7-4d56-927c-ff63debc79f8@kernel.org> (raw)
In-Reply-To: <CAPTae5+j9N=RBpfHVE-As+dz7HzrxXAH1enWrmSdFzu6DuaTBA@mail.gmail.com>

On 05/02/2025 10:07, Badhri Jagan Sridharan wrote:
> .
> 
> On Sun, Feb 2, 2025 at 6:11 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>>
>> On Sun, Feb 02, 2025 at 03:50:59AM +0000, Badhri Jagan Sridharan wrote:
>>> This change adds `snps,device-mode-intrpt-mod-interval`
>>
>> Thank you for your patch. There is something to discuss/improve.
> 
> Hi Krzysztof,
> 
> Thanks for taking the time to review ! Happy to address them.
> 
>>
>>> which allows enabling interrupt moderation through
>>> snps,dwc3 node.
>>>
>>> `snps,device-mode-intrpt-mod-interval`specifies the
>>> minimum inter-interrupt interval in 250ns increments
>>> during device mode operation. A value of 0 disables
>>> the interrupt throttling logic and interrupts are
>>> generated immediately if event count becomes non-zero.
>>> Otherwise, the interrupt is signaled when all of the
>>> following conditons are met which are, EVNT_HANDLER_BUSY
>>> is 0, event count is non-zero and at least 250ns increments
>>> of this value has elapsed since the last time interrupt
>>> was de-asserted.
>>
>> Please wrap commit message according to Linux coding style / submission
>> process (neither too early nor over the limit):
>> https://elixir.bootlin.com/linux/v6.4-rc1/source/Documentation/process/submitting-patches.rst#L597
> 
> Ack! will do in V2 of this patch.
> 
>>
>>>
>>> Cc: stable@kernel.org
>>> Fixes: cf40b86b6ef6 ("usb: dwc3: Implement interrupt moderation")
>>
>> I don't understand what are you fixing here.  Above commit does not
>> introduce that property.
> 
> Although the above commit does not add this property, it has
> implemented the entire feature except for the property so thought
> sending this with "Fixes:" while CCing  stable@ will allow the
> backport.  I am interested in having this patch in older kernel

Not implementing DT bindings is not a bug. Otherwise provide any sort of
proof that this was not intentional.

I can easily provide you proof why this was intentional: negative review
maintainers.


> versions as well where imod support has been added. Wondering what
> would be the right way to achieve this. Eager to know your thoughts !

So again, downstream and forks... NAK, you cannot push things to stable
just because you want them backported by Greg.

This is not acceptable.

> 
>>
>>
>>> Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
>>> ---
>>>  .../devicetree/bindings/usb/snps,dwc3-common.yaml   | 13 +++++++++++++
>>>  1 file changed, 13 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/usb/snps,dwc3-common.yaml b/Documentation/devicetree/bindings/usb/snps,dwc3-common.yaml
>>> index c956053fd036..3957f1dac3c4 100644
>>> --- a/Documentation/devicetree/bindings/usb/snps,dwc3-common.yaml
>>> +++ b/Documentation/devicetree/bindings/usb/snps,dwc3-common.yaml
>>> @@ -375,6 +375,19 @@ properties:
>>>      items:
>>>        enum: [1, 4, 8, 16, 32, 64, 128, 256]
>>>
>>> +  snps,device-mode-intrpt-mod-interval:
>>> +    description:
>>> +      Specifies the minimum inter-interrupt interval in 250ns increments
>>
>> Then use proper property unit suffix.
> 
> Ack ! changing to snps,device-mode-intrpt-mod-interval-ns in V2.
> 
>>
>>> +      during device mode operation. A value of 0 disables the interrupt
>>> +      throttling logic and interrupts are generated immediately if event
>>> +      count becomes non-zero. Otherwise, the interrupt is signaled when
>>> +      all of the following conditons are met which are, EVNT_HANDLER_BUSY
>>> +      is 0, event count is non-zero and at least 250ns increments of this
>>> +      value has elapsed since the last time interrupt was de-asserted.
>>
>> Why is this property of a board? Why different boards would wait
>> different amount of time?
> 
> Interrupt moderation allows batch processing of events reported by the
> controller.
> A very low value of snps,device-mode-intrpt-mod-interval-ns implies
> that the controller will interrupt more often to make the host
> processor process a smaller set of events Vs a larger value will wake
> up the host processor at longer intervals to process events (likely
> more). So depending what the board is designed for this can be tuned
> to achieve the needed outcome.

I do not see dependency on the board. Host has the same CPU always, so
it processes with the same speed.


Best regards,
Krzysztof

  reply	other threads:[~2025-02-05 13:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-02  3:50 [PATCH v1 1/2] dt-bindings: usb: snps,dwc3: Add property for imod Badhri Jagan Sridharan
2025-02-02  3:51 ` [PATCH v1 2/2] usb: dwc3: core: Obtain imod_interval from device tree Badhri Jagan Sridharan
2025-02-04  0:46   ` Thinh Nguyen
2025-02-05  8:39     ` Badhri Jagan Sridharan
2025-02-02 14:11 ` [PATCH v1 1/2] dt-bindings: usb: snps,dwc3: Add property for imod Krzysztof Kozlowski
2025-02-02 19:57   ` Krzysztof Kozlowski
2025-02-05  9:07   ` Badhri Jagan Sridharan
2025-02-05 13:50     ` Krzysztof Kozlowski [this message]
2025-02-05 18:19       ` Badhri Jagan Sridharan
2025-02-05 19:35         ` Krzysztof Kozlowski
2025-02-07  5:15           ` Badhri Jagan Sridharan

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=80172550-a3d7-4d56-927c-ff63debc79f8@kernel.org \
    --to=krzk@kernel.org \
    --cc=Thinh.Nguyen@synopsys.com \
    --cc=badhri@google.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=felipe.balbi@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jameswei@google.com \
    --cc=johnyoun@synopsys.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=stable@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox